Translations
Under the hood, i18next is used to manage translations. We enforce the following conventions:
- Locales must live in the
src/locales/directory (can be customized withlocalesDir) - A folder for the default locale is required, eg.
src/locales/en/ - Provide at least a
src/locales/en/common.jsonfile (can be customized withdefaultNamespace)
You can then use the t function (re-exported from i18next) and benefit from type-safety automatically. Have a look at
i18next docs to learn more.