I18n breaks when using a middleware #58583
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/cornedor/i18n-routing-bug
To Reproduce
Create a next app with:
When clicking a Next link:
Screen.Recording.2023-11-17.at.12.23.28.mov
Current vs. Expected behavior
When clicking the link, the correct locale will be used.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 Binaries: Node: 18.18.2 npm: 9.8.1 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 14.0.4-canary.1 eslint-config-next: 14.0.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Also tested in:
Which area(s) are affected? (Select all that apply)
Internationalization (i18n), Middleware / Edge (API routes, runtime), Routing (next/router, next/navigation, next/link)
Additional context
This seems to be an issue with all 14.0.x versions.
The text was updated successfully, but these errors were encountered: