
next-i18next v16: App Router, Pages Router, and Everything In Between
When next-i18next was first released, Next.js only had the Pages Router. The library became the go-to way to add i18n to Next.js apps, wrapping _app with appWithTranslation , calling serverSideTranslations in getStaticProps , and letting Next.js handle locale routing. Then Next.js introduced the App Router with Server Components, and our advice changed : "You don't need next-i18next anymore for App Router... just use i18next and react-i18next directly." We even published a streamlined setup guide showing how to wire it all up manually. But honestly? That manual wiring was boilerplate. Every project needed the same middleware, the same getT helper, the same I18nProvider setup. And projects migrating from Pages Router to App Router, or running both routers side by side, had no clean path. next-i18next v16 fixes all of that. What's New getT() for Server Components — async, namespace-aware, type-safe useT() for Client Components — reads language from URL params automatically createProxy()
Continue reading on Dev.to React
Opens in a new tab




