Most frameworks leave it to you how translations are being loaded. You are responsible to detect the user language, to load the translations and push them into the framework.
i18next takes care of these issues for you. We provide you with plugins to:
- detect the user language
- load the translations
- optionally cache the translations
- extension, by using post-processing - e.g. to enable sprintf support
i18next comes with strong defaults but it is flexible enough to fulfill custom needs.
- Use moment.js over intl for date formatting?
- Prefer different pre- and suffixes for interpolation?
- Like gettext style keys better?
i18next has you covered!
The framework was built with scalability in mind. For smaller projects, having a single file with all the translation might work, but for larger projects this approach quickly breaks down. i18next gives you the option to separate translations into multiple files and to load them on demand.
There are tons of modules built for and around i18next: from extracting translations from your code over bundling translations using webpack, to converting gettext, CSV and RESX to JSON.