Adding a new translation file
How to add a new translation file to your application.
To add a new translation to your application next to the default ones (common, auth, profile, etc.) you need to:
- create the new JSON file, for example
tasks.json
in thepublic/locales/<lang>
folder - add the new bundle name to the translations list in the
src/i18n.settings.ts
file:
export const defaultI18nNamespaces = [ 'common', 'auth', 'organization', 'profile', 'subscription',];
We add the tasks
bundle name to the defaultI18nNamespaces
:
export const defaultI18nNamespaces = [ 'common', 'auth', 'organization', 'profile', 'subscription', 'tasks'];
Now, refresh the dev server and your new bundled will be picked up by the i18n module.