SSR (additional components)
Last updated
Last updated
Then check out this article describing how to best internationalize it with i18next.
You should have a look at next-i18next which extends react-i18next to bring it to next.js the easiest way.
With
next-i18next@v8.0.0
andNext.js v10
, next-i18next has done a major rewrite of the package, leveraging the built-in internationalized routing provided by Next.js.Here you can also find a next-i18next app example in combination with locize, that offers 2 different approaches.
next-i18next@v5.0.0
supportsNext.js v9.5
in Serverless mode (as of July 2020). If your goal is to use earlier versions of Next.js with Serverless, then you should have a look at "Next Right Now", which is a Next.js 9 boilerplate with built-ini18next
,react-i18next
and Locize.Looking for an optimized Next.js translations setup? Here you'll find a blog post on how to best use next-i18next with client side translation download and SEO optimization.
Using SSG /
next export
? Here you'll find a simple tutorial on how to best use next-i18next in a SSG environment.
You should have a look at remix-i18next which extends react-i18next to bring it to Remix the easiest way.
Here you'll find a simple example and here a step by step tutorial on how to best use remix-i18next.
You should have a look at gatsby-plugin-react-i18next which extends react-i18next to bring it to Gatsby the easiest way.
Here you'll find a simple example and here a step by step tutorial on how to best use gatsby-plugin-react-i18next.
Use the I18nextProvider to inject the i18next instance for example bound to the http i18n instance on the request object using i18next-http-middleware.
To avoid asynchronous loading of translation on the client side (and the possible Suspense out of that) you will need to pass down initialLanguage (will call changeLanguage on i18next) and initialI18nStore (will prefill translations in i18next store).
The ExtendedApp in this case will also have the composed ExtendedApp.getInitialProps()