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

Slug only gets translated if transRoute is used. #815

Open
Krypto89 opened this issue Feb 3, 2022 · 0 comments
Open

Slug only gets translated if transRoute is used. #815

Krypto89 opened this issue Feb 3, 2022 · 0 comments

Comments

@Krypto89
Copy link

Krypto89 commented Feb 3, 2022

Describe the bug
Slug is not translated if transRoute is not used, although those are different features.

To Reproduce
If you do not used transRoute but translated slugs
substituteAttributesInRoute($attributes, $route, $locale);
gets never called and therefore the slug doesn't get translated.

If transRoute is used in combination with translated slugs
$this->substituteAttributesInRoute($attributes, $route, $locale);
get's called and therefore it's working.

This is the call which handles translated slugs:
https://github.com/mcamara/laravel-localization/blob/master/src/Mcamara/LaravelLocalization/LaravelLocalization.php#L383

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

1 participant