Docs
Internationalization (Tenantx)

Internationalization (Tenantx)

Internationalization (Tenantx)

Locales

  • Shipped: en, ar
  • RTL: ar

Add a new translation key

  1. Add the key to the TranslationKeys interface in frontend/src/lib/translations/types.ts (or use tUnsafe('key') until the union is regenerated).
  2. Add the English string in frontend/src/lib/translations/en.ts (or the appropriate pages/*/*.en.ts split file).
  3. Add the same key to the matching Arabic bundle when you want Arabic parity; otherwise runtime falls back to English where configured.

RTL checklist

  • Use isRTL from useLanguage for directional layout when needed.
  • document.documentElement.dir is set to rtl or ltr by the language layer.
  • Sidebar and other chrome flip using the same patterns as the main shell (side={isRTL ? 'right' : 'left'}).

Language storage key

  • Default in this kit: tenantx-language in localStorage.
  • Compatibility: the frontend migrates the previous extraction key on first read, then removes it.

Navigation

  • Prefer titleKey (or equivalent) on nav items so labels resolve through t('...').
  • useLanguage exposes t, language, and isRTL.