-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
alwaysRedirect freezing behavior #2262
Comments
Thanks, But using the edge channel did not fix #2255 for me, using the same reproduction repo.
yes it is the same repo, but i added the branch named issue2 for this one, that has the necessary changes to reproduce this issue https://github.com/pmnzt/nuxt-i18n-repo/tree/issue2 . |
Thank you for your reproduction updating. I've understood that
If you want to use cookies and browser navigator language to control routing, the nuxt i18n module give some API and Nuxt API (
|
Environment
nuxt 3.6.5
i18n v8-beta.13
Reproduction
https://github.com/pmnzt/nuxt-i18n-repo/tree/issue2
Describe the bug
Relating to #2255 , i tried to set alwaysRedirect to true, it seemed to fix that issue of redirecting to the browser's default locale but now i see another issue, no matter what i change 1 - removing cookies 2 - changing the browser's preferred locale, it still redirects me back to the previous browser's locale (the first time i opened the site) after that the locale would not want to be switched.
1- no matter how many times i change the preferred browser locale and removes cookies.
2 - if a cookie was saved on 'fr' for example Now switching to 'en' which is the defaultLocale in the config, using switchLocalePath(locale.code), does not work in this case.
3 - if the strategy is set to 'prefix' not 'prefix_except_default' , then switching to 'fr' via switchLocalePath, and switching back to 'en' does write the cookie and switch the language all times, however it still redirects to 'fr' not 'en' after reloading on site's root path, even though the cookie was been set to 'en' not 'fr' the last time.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: