From 7684201ba934110a0f0946632a3f1e2532cd0a17 Mon Sep 17 00:00:00 2001 From: Nicola Benaglia Date: Sat, 17 May 2025 09:09:19 +0200 Subject: [PATCH] Add info --- docs/i18n_languages.md | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/docs/i18n_languages.md b/docs/i18n_languages.md index 9fcf779..da5a64b 100644 --- a/docs/i18n_languages.md +++ b/docs/i18n_languages.md @@ -1,10 +1,25 @@ # I18N Guidelines -In JSON file: +[react-i18next](https://react.i18next.com/) is the framework used for internationalization. + +## Locales + +Locales are in folder `./src/i18n/locales`, one folder per language. + +A single JSON file represents a namespace (group of translation). +It's a key/value structure. + +Please: - Keep the file sorted -- Always write in lowercase +- First letter of each value is lowercase -In GUI: +Translation in GUI: -- If the first letter of the translation must be uppercase, use the postProcess, for example: `{t_auth('advanced_users', { postProcess: 'capitalizeFirst' })}` +- If the first letter of the translation must be uppercase, use the postProcess, for example: `t('core:advanced_users', { postProcess: 'capitalizeFirst' })` +- For all translation in uppercase `{ postProcess: 'capitalizeAll' }` +- See `.src/i18n/i18n.ts` for processor definition + +## Missing language? + +- Please open an issue on the project's github repository and specify the missing language