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
I have a website with next i18n enabled on it.
The configuration of i18n translation is described like this : i18n: { locales: ['fr-fr', 'fr-be', 'nl-be'], defaultLocale: 'fr-fr', },
Translation working as expected but we have a problem when multiple locales are defined in path.
For example, with i18n translation with the following configuration, we expected 404 error page to be triggered : localhost:3000/fr-fr/fr-be localhost:3000/fr-fr/nl-be localhost:3000/fr-be/nl-be etc...
Expected Behavior
For these pages described above, the index page is triggered and the last locale wrote in path is selected. localhost:3000/fr-fr/fr-be => display index instead of 404 page => select fr-be locale in context localhost:3000/fr-be/nl-be => display index instead of 404 page => select nl-be locale in context
To Reproduce
Just create a nextJS project, add next-i18n and add some locales in the configuration file.
Create a simple index.js page in pages directory.
Try to access to your website with multiple locales in path. Instead of displaying 404 error page, your index page will be show.
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 27, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.1.1
What version of Node.js are you using?
12.0.0
What browser are you using?
Chrome, Firefox
What operating system are you using?
macOS
How are you deploying your application?
next dev
Describe the Bug
I have a website with next i18n enabled on it.
The configuration of i18n translation is described like this :
i18n: { locales: ['fr-fr', 'fr-be', 'nl-be'], defaultLocale: 'fr-fr', },
Translation working as expected but we have a problem when multiple locales are defined in path.
For example, with i18n translation with the following configuration, we expected 404 error page to be triggered :
localhost:3000/fr-fr/fr-be
localhost:3000/fr-fr/nl-be
localhost:3000/fr-be/nl-be
etc...Expected Behavior
For these pages described above, the index page is triggered and the last locale wrote in path is selected.
localhost:3000/fr-fr/fr-be
=> display index instead of 404 page => select fr-be locale in contextlocalhost:3000/fr-be/nl-be
=> display index instead of 404 page => select nl-be locale in contextTo Reproduce
Just create a nextJS project, add next-i18n and add some locales in the configuration file.
Create a simple index.js page in pages directory.
Try to access to your website with multiple locales in path. Instead of displaying 404 error page, your index page will be show.
The text was updated successfully, but these errors were encountered: