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
To reproduce the behaviour I cloned the i18n-routing example. The gist is that the automatic locale detection only seems to be working if I visit the index page on the first load. The Next.js docs says this:
When a user visits the application root (generally /), Next.js will try to automatically detect which locale the user prefers based on the Accept-Language header and the current domain.
Shouldn't this be the behaviour for other pages as well? Is there any way to configure this right now?
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Here's a repo where it can be tested. The only change I made to the original repo was adding "es" and "en" as locales and setting "es" as default.
Open a new tab and go directly (not the index) to any of the defined routes like /gsp/first or /gssp
Navigate to other routes with the links provided
See the path not updating to /en
Expected behavior
If you visit the / page on first load you see that next updates the url to display the /en and showing the current locale as "en." I was hoping for this to be the behaviour for all routes.
My use case is a fairly simple one where I'm sending a route to my app on an email and I want to be able to display the app in the selected locale without having to send it directly in the email.
Screenshots
Index on first load
Any other route on first load
System information
OS: Windows 10
Browser: Chome v87
Version of Next.js: latest
Version of Node.js: 14.15.1
Additional context
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 28, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
To reproduce the behaviour I cloned the i18n-routing example. The gist is that the automatic locale detection only seems to be working if I visit the index page on the first load. The Next.js docs says this:
Shouldn't this be the behaviour for other pages as well? Is there any way to configure this right now?
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Here's a repo where it can be tested. The only change I made to the original repo was adding "es" and "en" as locales and setting "es" as default.
Repo
Expected behavior
If you visit the / page on first load you see that next updates the url to display the /en and showing the current locale as "en." I was hoping for this to be the behaviour for all routes.
My use case is a fairly simple one where I'm sending a route to my app on an email and I want to be able to display the app in the selected locale without having to send it directly in the email.
Screenshots
Index on first load
Any other route on first load
System information
Additional context
The text was updated successfully, but these errors were encountered: