Currently supported locales
- Client
- Server
The client (
client/locales/) currently ships with these language files:English is the default locale.
Adding a new language
- Client
- Server
1
Create the locale JSON file
Add a new JSON file to
client/locales/ named after the language code, e.g. fr.json for French. Use an existing file like en.json as a reference for all the keys that need to be translated.The JSON structure is a nested object where keys are translation identifiers and values are the translated strings:client/locales/fr.json
2
Register the locale in config.js
Add the new locale to the The
availableLocales array in client/config.js:client/config.js
dateFnsKey must match the locale key used by the date-fns library.3
Import the locale file in the language store
Open
client/stores/language/index.js and add an import for your new locale file alongside the existing ones:client/stores/language/index.js
4
Add the locale to localeContents
In the same file (The client will now serve your new language to users who select it in the language picker.
client/stores/language/index.js), add your new locale to the localeContents object inside the t() function:Locale file structure
Both the client and server use JSON files with a nested key structure. Top-level keys group related strings by feature area. Client locale example (client/locales/en.json):
server/src/locales/en.json):
"An error occurred: {errorMessage}".

