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
Dynamic routes using the wrong locale in Next 13.4.13 #1131
Comments
I experience something similar while using When navigating through next-translate and the plugin of v2.5.3, next.js v13.4.13
Any idea? ======== Update I figured this is related to
As you can see, the middleware has nothing to do with locale. If I delete middleware.ts, navigation works as expected and all translations are loaded. @aralroca I saw a workaround with [lang] prefix but in my case:
Is it a known problem? I do not want to remove the middleware, and want to keep urls in current format |
I can confirm what @shelooks16 has found. When removing my middleware.ts, which does not handle anything locale-related, this issues does not occur. |
What version of this package are you using? 2.5.3
What operating system, Node.js, and npm version? Windows, Node 20, pnpm
What happened?
I have an app with the two locales en (base) and de. Some of my routes are dynamic, like /[channel] and /video/[id].
After updating to Next 13.4.13, I am encountering this behavior in my app: When navigating to a dynamic route like /[channel], it switches to the base locale even though the URL locale doesn't change. So it would navigate from /de to /de/test, but loads the en locale. When navigating back to a non-dynamic route it uses the correct locale again. This only happens with Next 13.4.13, dynamic routes and when navigating using a router Link or router.push.
Here's the dev server logs:
The text was updated successfully, but these errors were encountered: