-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
The locale doesn't change for pages other than index page #619
Comments
You need to update to the last version of Next.js. Should be fixed after this PR vercel/next.js#21930. Try Next.js 10.2.3 😊 |
I too have this issue, even after updating to latest version of react, and next-translate. |
Upgrade to nextjs 10.2.3 solved my issue |
@Gyaniultimate after migrate Next.js solve it? |
@aralroca I have a same issue but upgrade next.js to 10 cannot solve it. The locale language can only be detected when I entered the website for the first time. When the page changed by using Router.push, the locale language keep showing the defaultLocale that sets in config file. Also, I tried to set NEXT_LOCALE into cookie, the value is correct but the pages keep getting the wrong defaultLocale. |
@peggy1000423 can try to use specifically this version 10.2.3 |
I'm experiencing the same issue with next 12.0.7 and next-translate 1.2.0. For the index page the browser gets redirected to the correct locale prefix. For subpages this does not happen. Update: defaultLocale: "en"
|
Check if you are using Link from next/link. I had the same problem but it was using link from Material Ui which overrides locales. |
This still seems to be an issue in v12.1.4 |
Any news of this? I can confirm that the issue is there in the latest version of NextJS. If I directly go to a particular route, it does not redirect to the specific locale page but rather go to the page for the default locale. I tried to play around with the middleware but that is no help either as the request object does any information on the right locale. It would be great if you could at least provide a direction how to fix this issue in case the bug is not already fixed. Thanks a lot in advance. |
With NextJS 13, my middleware works fine under development environment while not trigger at all under production environment... |
Still have this issue under dev environment with NEXT_LOCALE set.
|
Did anyone figure out how to fix this? I'm having the same issue |
I tried using next-translate v1.0.7
Using the sub path /ja
it works for index page
localhost:3000/ja
, but not working when navigating to other page, it keeps returning to default en localelocalhost:3000/ja/product/detail
The text was updated successfully, but these errors were encountered: