Skip to content

i18next

i18next looks up and formats messages for JavaScript apps across multiple frameworks.

Visit i18next

When can you use i18next in an existing app?

i18next looks up translated messages in a JavaScript app. It works in the browser and in environments such as Node.js. Start with a known locale and one set of messages per language, then connect your interface to that setup.

Keep message names stable so each language file supplies its own text for the same job. The library loads and formats the messages you provide. Translators or your team still write the wording.

Why does the count have to be part of the message?

Pass the count to i18next so it can choose the correct plural form for the language. The translation can place that value where it sounds natural. Avoid constructing the sentence from fragments copied from the English layout.

The built-in number and date formatters use JavaScript’s international formatting features. Check that the environments running the app support the formatting and plural features you use.

Which language appears if a translation is missing?

You can set a fallback language, such as English, for when a message cannot be found in the requested language. i18next can look for a broader form of a language first, such as German without a country suffix. If no matching translation is found, the key can appear.

A screen with a fallback may look complete while showing mixed languages. Include a check for missing messages before release, especially for errors and instructions.

How can you check a missing message on paper?

Draw two message files for a fictional waiting list. Add a one-person and a multiple-person message in each. Pick English as the fallback.

  1. Use the count
    Write the result for one person and three people in each language. Mark where the number appears.
  2. Remove one message
    Cross out the multiple-person message from the target language and mark which text your configured fallback should show. Check the supported cases before shipping.
  3. Save what can move
    Keep both resource files, the plural forms and the fallback setting with the code. i18next is MIT-licensed. An optional translation service has its own terms and costs.