We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a route:
$router->group(['prefix' => trans('core::routes.realization.index')], function (Router $router) { $locale = LaravelLocalization::setLocale() ?: App::getLocale(); $router->get('/', [ 'as' => $locale . '.realization', 'uses' => 'PublicController@index', ]); $router->get('{category_slug}', [ 'as' => $locale . '.realization.category.slug', 'uses' => 'PublicController@showRealizationCategory', ]); $router->get('{category_slug}/{realization_slug}', [ 'as' => $locale . '.realization.slug', 'uses' => 'PublicController@showRealization', ]); });
I want to display links in every language:
<ul> @foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties) <li> <a rel="alternate" hreflang="{{ $localeCode }}" href="{{LaravelLocalization::getLocalizedURL($localeCode) }}"> {{ $properties['native'] }} </a> </li> @endforeach </ul>
Unfortunately, the translations are not substituted in place of the prefix.
Result: /realizacje /en/realizacje /fr/realizacje
The expected result: /realizacje /en/realizations /fr/realisations
The text was updated successfully, but these errors were encountered:
Hi,
This seems to be an issue with laravel localization package, I would suggest to report it there.
Sorry, something went wrong.
Are you sure you add the localize midleware and set properly the prefix? I never do this but i think you miss this portion of code
localize
https://github.com/mcamara/laravel-localization#translated-routes
Route::group( [ 'prefix' => LaravelLocalization::setLocale(), 'middleware' => [ 'localize' ] // Route translate middleware ], ....
No branches or pull requests
I have a route:
I want to display links in every language:
Unfortunately, the translations are not substituted in place of the prefix.
Result:
/realizacje
/en/realizacje
/fr/realizacje
The expected result:
/realizacje
/en/realizations
/fr/realisations
The text was updated successfully, but these errors were encountered: