You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm trying to configure hideDefaultLocaleInURL to true in order to don't display in the url the default language (en).
With this configuration if I try to switch do default language, the framework do this redirects:
Expected behavior
The expectation is that urls without default locale parte don't execute redirect to previous locale.
More info:
Version of Laravel: 10.0
Version of the Laravel-localization package: 1.8
Which middleware is used in Route::groups: 'localize' =>[ \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class, \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class, \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class, \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class, \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class ]
Copy of the config file ( or at least setting of supportedLocales, useAcceptLanguageHeader and hideDefaultLocaleInURL).
This is my laravellocalization.php file:
Describe the bug
I'm trying to configure hideDefaultLocaleInURL to true in order to don't display in the url the default language (en).
With this configuration if I try to switch do default language, the framework do this redirects:
To Reproduce
This is my web.php route file:
I also translated routes. This is /lang/en/routes.php for example
Expected behavior
The expectation is that urls without default locale parte don't execute redirect to previous locale.
More info:
Route::groups
:'localize' =>[ \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class, \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class, \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class, \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class, \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class ]
supportedLocales
,useAcceptLanguageHeader
andhideDefaultLocaleInURL
).This is my laravellocalization.php file:
The text was updated successfully, but these errors were encountered: