Next.js App Router i18n with next-intl
This tutorial explains a clean i18n setup for the App Router using next-intl.
What you get
/enand/frlocale prefixes- Messages under
messages/en.jsonandmessages/fr.json - A proxy (Next.js 16) to handle locale negotiation
- A great developer experience: strongly typed messages, clear structure, predictable routing
Recommended structure
app/[locale]/...for localized routesmessages/{locale}.jsonfor stringsi18n/request.tsfor configuringnext-intl
Common pitfalls
- Forgetting the proxy file (or using deprecated middleware)
- Not providing a default locale fallback
- Mixing server/client translations incorrectly
Practical advice
- Keep messages small and organized (group by feature:
nav.*,contact.*,sections.*) - Use a single
ContactAPI endpoint and forward to providers (Formspree, email service, CRM)
If you want, we can add typed message keys and a lint rule to catch missing translations.
Quick commands
npm install
npm run dev