-
-
Notifications
You must be signed in to change notification settings - Fork 761
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
What is correct way change current language when i use dynamic routes? #603
Comments
Can you please provide a reproducible example? |
Sure, https://github.com/Valeronlol/next-i18next-bug-report |
Looks like a genuine bug:
We could potentially use the PR welcome. |
My team figured out how to solve this problem with switching dynamic routing in our project, by moving language switch button to static /profile route. But the issue still remained in the next-i18next library. |
#413 is already open for that, and there are already issues open on the NextJs repo. |
I'm trying to change current language the next way.
Also use dynamic routes like:
-- user
--- [id].js
When I switch the language on any other page everything works fine, but when I try to change lang on /[lang]/user/[id] route - the following error will be thrown:
I use latest version of next and next-i18next versions.
A similar problem was with using Link imported from i18n, but i resolve it using Router.
The text was updated successfully, but these errors were encountered: