Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routes with wildcards don't translate #294

Closed
Morinohtar opened this issue Feb 19, 2016 · 3 comments
Closed

Routes with wildcards don't translate #294

Morinohtar opened this issue Feb 19, 2016 · 3 comments

Comments

@Morinohtar
Copy link

Hi,

I'm having an issue only with the routes that have wildcards, where the route doesn't get translated, well, more accuratly the prefix does but not what comes next. All the other type of routes do translate well.
Example:
English file will have this: 'jobs/{job_offer_slug}'
Portugues file: 'empregos/{job_offer_slug}'

When i change the language from EN to PT, this will happen for example:

www.example.com/en/jobs/medical-offer -> www.example.com/pt/jobs/medical-offer
when it should be:
www.example.com/en/jobs/medical-offer -> www.example.com/pt/empregos/medical-offer

but the project works well from "normal" pages, like for example:

www.example.com/en/about-us -> www.example.com/pt/sobre-nos

Can anyone help me out? Thanks.

@Morinohtar
Copy link
Author

Ok, after a couple more tests the problem is this: the translation doesn't work if the route has parameters that have a model binding.

Routes with "normal" parameters work fine. Routes that have parameters that are binded to models don't work.

@arcanedev-maroc
Copy link

You can try my Localization package: https://github.com/ARCANEDEV/Localization

It's based on mcamara/laravel-localization package, with more enhancements and features.

I think this may helps you: ARCANEDEV/Localization#19

@Morinohtar
Copy link
Author

Ok, thanks, im going to check that.

@mcamara mcamara closed this as completed Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants