Translating the app

Every word in the app comes from a dictionary file, so adding a language needs no programming. English is the reference; a translation can be partial, and anything not yet translated shows in English.

Available today: English, Bangla, Spanish, French, Portuguese, German, Russian, Turkish, Hindi, Chinese (Simplified), Japanese, Korean, Indonesian, Malay, Vietnamese, Arabic and Urdu. Under Home → Language, "Device language" picks whichever of these matches the phone or PC, and falls back to English.

Apart from English, the translations were drafted with AI help and haven't all been reviewed by native speakers yet. If a word reads wrong, especially a debate term your circuit says differently, edit that line in apps/app/src/i18n/<code>.ts and open a pull request, or open a translation issue.

Arabic and Urdu are right-to-left: choosing one mirrors the whole layout (see Right-to-left languages below).

Start a new language

You need Node.js and a copy of the source code. From the project folder, run:

npm install
npm run i18n:new -- bn "বাংলা" "Bangla"

The three values are the language code, the language's name in itself (shown in the app's language picker) and its English name. Use a BCP 47 code: a two- or three-letter code like bn, es or fil, plus a region or script when it matters, like pt-BR or zh-Hant.

This creates apps/app/src/i18n/bn.ts, a copy of the English dictionary, and adds the language to the picker.

Translate

Open the new file and replace each English text with your translation:

home: {
  newRound: 'নতুন রাউন্ড',
  startRound: 'রাউন্ড শুরু করুন',
  • Keep the keys (the part before the colon) exactly as they are.
  • Keep placeholders like {{time}}, {{seat}} or {{count}}. You can move them within the sentence: '{{time}} বাকি'.
  • Plurals: keys ending in _one and _other are picked by the number. Languages with more plural forms can add _zero, _two, _few or _many; see the CLDR plural rules.
  • Skip anything by deleting its line; it will show in English.
  • Debate terms (POI, BP, Prime Minister…) can stay in English if that's what debaters in your language use.

Right-to-left languages

Arabic, Urdu, Hebrew, Persian and other right-to-left languages work the same way; the app recognises them by their code and mirrors the layout on its own.

  • Windows and browsers switch straight away.
  • Android mirrors the layout when the app starts, so after switching between a left-to-right and a right-to-left language the app asks you to close and reopen it.
  • Arrows in your text should point the way your language reads: Back is '→ رجوع' and Next is 'التالي ←'.
  • Numbers stay in Western digits (0–9) and left to right, as they appear on the clock and the ballot. Write {{min}}–{{max}} style ranges as words if you can ('بين {{min}} و{{max}}').
  • Don't add invisible direction marks yourself: the app starts every right-to-left string with one, so a line that begins with a placeholder or a role code ("POO من DLO") still reads right to left.
  • Arabic uses all six plural forms: _zero, _one, _two, _few, _many and _other.

Check your work

npm run check:i18n

It reports how much is translated, and stops on mistakes such as a mistyped key or a placeholder English doesn't have:

Languages:
  bn: 120/297 strings translated (40%)

To see it in the app, run it (npm run web in a browser, or npm run desktop on Windows) and choose your language under Home → Language.

Send it in

Open a pull request with your file (see CONTRIBUTING). Partial translations are welcome. Not comfortable with Git? Open a translation issue and we'll help.