mcamara / laravel-localization

Easy localization for Laravel
MIT License
3.32k stars 507 forks source link

Routes Translation #877

Open Adron55 opened 11 months ago

Adron55 commented 11 months ago

Describe the bug I am trying to use route localization with dynamic parameters and want to translate dynamic paramaters on listener. Problem is that when I am writing listener it doesn't go along with route translation.

When I am not using routes.translation in EventServiceProvider.php. It looks like in example at least games part changes which is not dynamic paramater and added in en/routes.php and tr/routes.php For example 1: en/games/action (English) tr/oyunlar/action (Turkish)

When I am activating routes.translation in EventServiceProvider.php, it does not even change games part. If my current language is english it will show en/games/action tr/games/action

If my current language is turkish it will show en/oyunlar/action tr/oyunlar/action

I want to translate action parameter depending on which current language is.Am I doing something wrong or is there any bug ?

To Reproduce I created project with laravel-localization from scratch. You can clone it and reproduce it

Expected behavior Wants to implement route dynamic parameter translation regarding language in language selector

More info: