- Add an entry to
AVAILABLE_LOCALES
in locale_config.js with the appropriate locale code and in-language translation of the language. - Copy an existing locale (e.g. en.json) to a new file using appropriate locale code as filename. (e.g. zh.json)
- For locales that have duplicate codes (e.g.
zh
andzh-ch
), editFALLBACK_LOCALES
in locale_config.js to define the fallback locale so that the locale file doesn't need to be duplicated.
- For locales that have duplicate codes (e.g.
- Edit your new locale file with your translations.
- Add your new key and translation to en.json.
- Run
node sync_locales.js
in this directory. This will sync any new keys and translations made inen.json
to all the other locale files. - Update the other locale files with correct translations if available.