Translating

Translating Nidus

Thanks for helping translate Nidus! This guide explains everything you need to add or improve a translation.

Quick start

  1. Copy the template file:

    cp web/src/lib/i18n/template.json web/src/lib/i18n/<code>.json

    Replace <code> with the ISO 639-1 language code (e.g. ko for Korean).

  2. Register your locale in web/src/lib/i18n/locales.ts:

    ko: { label: '한국어', flag: '🇰🇷' },
  3. Translate all values in your JSON file (see format below).

  4. Validate your file:

    cd web && npm run i18n:validate
  5. Open a pull request.

That's it — the i18n system auto-discovers JSON files and registers them automatically.

File format

Translation files are JSON with one level of nesting — sections containing key-value pairs:

{
  "section": {
    "key": "Translated text",
    "keyWithParam": "Hello {name}, you have {count} items"
  }
}

Rules

Example

From fr.json:

{
  "setup": {
    "progress": "Étape {current} sur {total}"
  }
}

Korean translation:

{
  "setup": {
    "progress": "{total}단계 중 {current}단계"
  }
}

Reference file

The reference file is web/src/lib/i18n/fr.json (French). All other locale files must have the exact same keys. English (en.json) is also available for reference if you don't read French.

Template

web/src/lib/i18n/template.json contains all keys with empty values — use it as a starting point.

Validation

Run the validation script to check your file against the reference:

cd web && npm run i18n:validate

It reports:

All keys must match for the validation to pass.

Fallback chain

When a key is missing in the current locale, Nidus falls back:

  1. Selected language
  2. English (en)
  3. French (fr)
  4. Raw key (e.g. common.loading)

This means partially translated files still work — missing strings fall back to English.

Currently supported languages

CodeLanguageFlag
frFrançais🇫🇷
enEnglish🇬🇧
esEspañol🇪🇸
deDeutsch🇩🇪
ptPortuguês🇵🇹
itItaliano🇮🇹
nlNederlands🇳🇱
ruРусский🇷🇺
zh中文🇨🇳
ja日本語🇯🇵
arالعربية🇸🇦

Tips