i18next documentation
🏠 i18next🌐 localization as a service🎓 i18next crash course💾 GitHub Repository
  • Introduction
  • Overview
    • Getting started
    • Comparison to others
    • API
    • Configuration Options
    • Supported Frameworks
    • Plugins and Utils
    • For Enterprises
    • First setup help
    • TypeScript
  • Translation Function
    • Essentials
    • Interpolation
    • Formatting
    • Plurals
    • Nesting
    • Context
    • Objects and Arrays
  • Principles
    • Best Practices
    • Translation Resolution
    • Namespaces
    • Fallback
    • Plugins
  • How to
    • Add or Load Translations
    • Extracting translations
    • Caching
    • Backend Fallback
    • FAQ
  • Misc
    • JSON Format
    • Creating own Plugins
    • Migration Guide
    • The history of i18next
    • Testimonials
  • 🌐localization as a service
  • 🎓i18next crash course
  • 💾GitHub Repository
Powered by GitBook
On this page
  • Misc
  • i18next is awesome. How can I support the project?
  • Loading issues
  • I don't see my translations!!!
  • Translation
  • How to translate the resource files?
  • How do i know which plural suffix i have to use?
  • Why are my plural keys not working?
  • How should the language codes be formatted?
  • Process
  • How do I keep overview over my translation progress?
  • How to handle with changes in e2e tests?
  • How to use i18next in serverless environments?
  1. How to

FAQ

Last updated 5 months ago

Misc

i18next is awesome. How can I support the project?

There are a lot of ways to support us. Make a PR for a feature requested. Improve the documentation. Help others to get started. Spread the word.

Further you could try - our localization as a service offering. It's like donating to i18next but with additional benefits for you - like saving hours of time translating your project.

Loading issues

I don't see my translations!!!

Try setting debug: true on init and check the console log. There is rather sure a warning for unable to resolve the loadPath or invalid json. Check if the translation files are accessible via browser.

Translation

How to translate the resource files?

How do i know which plural suffix i have to use?

Why are my plural keys not working?

Are you seeing this warning in the development console?

i18next::pluralResolver: Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.

tldr;

npm install intl-pluralrules
import 'intl-pluralrules'

How should the language codes be formatted?

lng-(script)-REGION-(extensions) i.e.

  • en, en-US or en-GB

  • zh, zh-HK or zh-Hant-HK

As soon as you use the dash character - the language codes are tried to be formatted with Intl.getCanonicalLocales.

Process

How do I keep overview over my translation progress?

How to handle with changes in e2e tests?

For e2e tests a good tactic is to set language to cimode on init. This will set i18next to always return the key on calling i18next.t. Want to add the namespace to returned value change appendNamespaceToCIMode: true on init.

How to use i18next in serverless environments?

Due to how serverless functions work, you cannot guarantee that a cached version of your data is available. Serverless functions are short-lived, and can shut down at any time, purging any in-memory or filesystem cache. This may be an acceptable trade-off, but sometimes it isn't acceptable.

Because of this we suggest to not use a remote backend and to download the translations and package them with your serverless function.

For a quick and dirty machine translation you may have a look at . But in general we suggest to use a smart Translation Management Service like to translate your i18next resources.

For professional translations we advice you to work with . Or at least proofread the results coming from machine translations.

On the there is a tool to get them.

Or try , it shows an overview of your translations in a nice UI. It shows also the appropriate plural forms.

Or you use a smart translation management system, like .

With v21 we streamlined the suffix with the one used in the .

In environments where the API is not available (like older Android devices), you may need to the API. In case it is not available it will fallback to the plural handling. And if your json is already using the new suffixes, your plural keys will probably not be shown.

Theoretically, you're not bound to any specific language code format, but if you want to make use of all the in built language features, like proper and correct , we strongly suggest to use the following iso norm (BCP 47 language tag):

Other examples are listed here:

And more information about the format can be found here:

Try , it shows an overview of your translations in a nice UI. Check which keys are not yet translated.

If you need more, it might be time to use a .

Read more about this topic, .

this free translator
locize
human translators
plural page
translation-check
locize
Intl API
Intl.PluralRules
polyfill
Intl.PluralRules
i18next JSON format v3
pluralization
fallback resolution
https://www.iana.org/assignments/language-tags/language-tags.xhtml
https://www.w3.org/International/articles/language-tags/
translation-check
translation management tool
locize.com
here
https://translate.i18next.com