Internationalization (Tenantx)
Locales
- Shipped:
en,ar - RTL:
ar
Add a new translation key
- Add the key to the
TranslationKeysinterface infrontend/src/lib/translations/types.ts(or usetUnsafe('key')until the union is regenerated). - Add the English string in
frontend/src/lib/translations/en.ts(or the appropriatepages/*/*.en.tssplit file). - 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
isRTLfromuseLanguagefor directional layout when needed. document.documentElement.diris set tortlorltrby 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-languageinlocalStorage. - 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 throught('...'). useLanguageexposest,language, andisRTL.