Introduction
Last updated
Last updated
react-i18next is a powerful internationalization framework for / which is based on . Check out the and .
The module provides multiple components eg. to assert that needed translations get loaded or that your content gets rendered when the language changes.
Learn once - translate everywhere.
Before: Your React code would have looked something like:
After: With the Trans
component just change it to:
react-i18next is optimally suited for server-side rendering. It provides extra extension point to work with next.js, for e.g. .
As react-i18next depends on you can use it in any other UI framework and on the server-side (node.js, .net, ...) too. Like the React philosophy - just:
Check out and the corresponding about "Vite + React + TypeScript" with i18next.
you'll find a simple tutorial on how to best use react-i18next. Some basics of i18next and some cool possibilities on how to optimize your localization workflow.
Using Next.js? you'll find a blog post on how to best use with and SEO optimization.
Using Next.js with the new App Router? Then is what you are looking for!
Using Remix? you'll find a simple example and on how to best use remix-i18next.
Using Gatsby? you can find an example and an appropriate .
If you prefer not using semantic keys but text - .
i18next supports translation management tools such as .
you can find a step by step guide, which will unleash the full power of i18next in combination with locize. See how your developer experience with this localization workflow . There's also the possibility to have an , with the help of the and the use of the save missing keys functionality, new keys not only gets added to locize automatically, while developing the app, but are also into the target languages using machine translation (like ).