Next.js Discord

Discord Forum

i18n App Router default lang on /

Unanswered
Egyptian Mau posted this in #help-forum
Open in Discord
Avatar
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

9 Replies

Avatar
Egyptian MauOP
Can someone help me with my issue please ? 🙏
Avatar
Thai
What i18n library are you using?
Avatar
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
Avatar
Egyptian MauOP
Can you please help me @Thai ?
Avatar
Thai
yeah, this actually isn't a library - use this one, a proper library: https://next-intl-docs.vercel.app/docs/getting-started
Avatar
Egyptian MauOP
Thank you !