Adds a complete Arabic locale (2759 keys, full parity with en) and wires it into routing, RTL direction detection, message loading, the language switcher, and flag icons alongside the existing he/fa RTL locales.
7 lines
258 B
TypeScript
7 lines
258 B
TypeScript
// RTL locales: Arabic (ar), Hebrew (he), and Persian/Farsi (fa). Everything else is LTR.
|
|
const rtlLocales = new Set(['ar', 'he', 'fa']);
|
|
|
|
export function getLocaleDirection(locale: string): 'ltr' | 'rtl' {
|
|
return rtlLocales.has(locale) ? 'rtl' : 'ltr';
|
|
}
|