<#1044 Add Farsi, Arabic, and Hindi — 16 languages...
# osctrl
g
#1044 Add Farsi, Arabic, and Hindi — 16 languages, with RTL support Pull request opened by javuto Add Farsi, Arabic, and Hindi — 16 languages, with RTL support Problem Coverage ended at 13 languages, and the UI had no right-to-left support — a prerequisite for Farsi and Arabic. Change • New languages: Farsi (fa-IR, فارسی 🇮🇷), Arabic (ar-SA, العربية 🇸🇦), and Hindi (hi-IN, हिन्दी 🇮🇳) — full 671-key catalogs each, type-checked against the English contract and enforced by the catalog-parity test. Arabic uses complete ICU plural categories (zero/one/two/few/many/other). • RTL support: new
RTL_LANGUAGES
set and
isRTL()
helper in the registry; switching to Farsi or Arabic sets
dir="rtl"
on
<html>
so the entire UI mirrors, and any other language resets to
ltr
so nothing is left stale. Verified by a new direction-flip test (Arabic → rtl → back to English → ltr). • Cross-device sync extended: the backend
SupportedLanguages
allowlist adds fa/ar/hi, so the preferred-language PATCH/reconcile flow accepts the new tags with no other changes. Notes • Flags are decorative (
aria-hidden
); endonyms are the accessible labels. • The dir attribute follows the active language, including when the server-side preference is applied at login. Validation •
npm run check
— clean • Frontend: 373/373 tests — 16-language catalog parity, new flags in the selector test, RTL direction test • Go: build +
pkg/types
,
pkg/users
,
cmd/api
suites pass • Production build: 15 lazy locale chunks (9.7–11.6 KB gz), English bundled in the main chunk jmpsec/osctrl