-
-
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
App Router - Default locale without it's name on url #1155
Comments
@mbaldas I'm running into a similar issue, did you end up getting some answer or idea for this? |
bump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of this package are you using?
2.5.3
And using 2.6.0 for
next-translate-plugn
What happened?
I'm having trouble implementing i18n into Next 13 app router
I set my pages under: app/[lang]/example/[slug]
Everything works great when I have a route with the lang explicitly on the url, for example
localhost:3000/fr/example/slugish-url-item/ works with FR translations
localhost:3000/en/example/slugish-url-item/ works with EN translations
The problem is, in my case the /en/ should be omitted and treated like the default locale
So if I go to: localhost:3000/example/slugish-url-item/ it should open the page with the EN translations
But the problem is that it just redirects to my 404 page, assuming Next couldn't find this page on the app router
What would be the solution to having a default locale that's omitted on the URL using app router?
My
i18n.js
file on the root foldermodule.exports = { locales: ['en', 'fr'], defaultLocale: 'en', localeDetection: false, pages: { '*': ['global'], }, }
My
middleware.ts
The text was updated successfully, but these errors were encountered: