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:
Version of Laravel - 8.83.27
Version of the Laravel-localization package - 1.8
Which middleware is used in Route::groups - 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath'
Copy of the config file ( or at least setting of supportedLocales, useAcceptLanguageHeader and hideDefaultLocaleInURL). - supportedLocales['en','tr'], useAcceptLanguageHeader = true, hideDefaultLocaleInURL = true,
Minimal steps to reproduce on a clean Laravel installation. -you can clone it from github
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:
Route::groups
- 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath'supportedLocales
,useAcceptLanguageHeader
andhideDefaultLocaleInURL
). - supportedLocales['en','tr'], useAcceptLanguageHeader = true, hideDefaultLocaleInURL = true,