Skip to content

i18n: add popular language packs #10

Description

@AimTune

Goal

Expand Chativa's translations beyond EN / TR to cover the most-requested languages for chat widgets in enterprise web/SaaS contexts.

What needs translating

Two files per language:

  1. `packages/ui/src/i18n/.json` — chat shell, header, input, message list, survey, emoji picker.
  2. The `` block in `packages/genui/src/i18n/index.ts` — built-in GenUI components (form, appointment, rating, date picker).

Both must mirror the `en` keys exactly. Add the new resource to `packages/ui/src/i18n/i18n.ts` so `i18next-browser-languagedetector` can pick it up.

How to contribute (per language)

For each language:

  1. Copy `packages/ui/src/i18n/en.json` → `packages/ui/src/i18n/.json` and translate every value.
  2. Add a sibling block in `packages/genui/src/i18n/index.ts` (copy the `EN` const, translate values, register via `addResources`).
  3. Register the resource in `packages/ui/src/i18n/i18n.ts`.
  4. Add a sandbox language switcher entry if it isn't already discovered automatically.
  5. Native-speaker review preferred — please flag in the PR if you used machine translation only.

Languages to add

Tick when the PR lands. One PR per language is fine; bundling several is also fine.

Latin-script

  • Spanish — `es`
  • French — `fr`
  • German — `de`
  • Italian — `it`
  • Portuguese (Brazil) — `pt-BR`
  • Polish — `pl`
  • Dutch — `nl`
  • Indonesian — `id`
  • Vietnamese — `vi`

Cyrillic

  • Russian — `ru`
  • Ukrainian — `uk`

CJK

  • Japanese — `ja`
  • Korean — `ko`
  • Chinese Simplified — `zh-CN`
  • Chinese Traditional — `zh-TW`

Devanagari

  • Hindi — `hi`

RTL (depends on #11)

Translation work for Arabic and Hebrew can start in parallel, but UI must not flip into the wrong direction by accident. Merge order: land the RTL infrastructure issue first, then these.

  • Arabic — `ar`
  • Hebrew — `he`

Acceptance per language

  • All keys present, no untranslated English strings left.
  • Plurals (e.g. `survey.starLabel_one` / `_other`) follow the language's plural rules. CLDR plural categories: see https://cldr.unicode.org/.
  • Existing tests still pass; if a test references a hardcoded English string, fix the test to assert structurally instead.
  • Screenshot in the PR showing the widget in the new language.

Out of scope

  • Machine-translation pipeline / translation management platform integration. If this list grows, we can revisit (e.g. Crowdin, Lokalise).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions