i18n App Router default lang on /
Unanswered
Egyptian Mau posted this in #help-forum
Egyptian MauOP
Hi !
I'm trying to set the i18n on my website, I want to use 3 lang with the 'fr' in default.
Everything is working when I use my domain with /fr /en or /de
My main issue is that I want to be able to display french content on domain.com/ and not on domain.com/fr.
Now that I'm using the [lang] folder the pages are not on /app anymore so the domain.com/ return a 404.
How to make my domain.com/ display my default lang without duplicating all pages ?
The pages structure is like this :
src/app/[lang]/...
Thank you
I'm trying to set the i18n on my website, I want to use 3 lang with the 'fr' in default.
Everything is working when I use my domain with /fr /en or /de
My main issue is that I want to be able to display french content on domain.com/ and not on domain.com/fr.
Now that I'm using the [lang] folder the pages are not on /app anymore so the domain.com/ return a 404.
How to make my domain.com/ display my default lang without duplicating all pages ?
The pages structure is like this :
src/app/[lang]/...
Thank you
9 Replies
Egyptian MauOP
Can someone help me with my issue please ? ðŸ™
Thai
What i18n library are you using?
Egyptian MauOP
I'm using next-i18next !
Do you recommend me a library ?
I don't know how to do it or what library use
I used this middleware : https://nextjs.org/docs/app/building-your-application/routing/internationalization
Egyptian MauOP
Can you please help me @Thai ?
Thai
yeah, this actually isn't a library - use this one, a proper library: https://next-intl-docs.vercel.app/docs/getting-started
Egyptian MauOP
Thank you !