Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

next-i18next App Router example (no locale in path)

This example shows how to use next-i18next v16 with the Next.js App Router without a locale prefix in the URL (cookie-based language detection).

URLs stay clean (/about instead of /en/about), and language switching is handled via useChangeLanguage().

It demonstrates:

  • Server Components using getT() from next-i18next/server
  • Client Components using useT() from next-i18next/client
  • Cookie-based language detection via createProxy() in proxy.js (no URL redirects)
  • useChangeLanguage() hook for switching languages
  • I18nProvider for client-side hydration

Getting started

npm install
npm run dev

Blog post

This example was originally based on this blog post and discussion.