mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
feat(i18n): add RTL layout support for Arabic and other RTL locales
- Export `isLocaleRTL` from `@sofa/i18n` to detect right-to-left locales - Native: call `I18nManager.allowRTL` / `forceRTL` on locale init and on locale change; reload the app immediately if the current layout direction doesn't match the persisted locale, and prompt the user to restart when switching between LTR and RTL locales - Native: flip the `SettingsRow` chevron to `IconChevronLeft` when `I18nManager.isRTL` is true - Native: add Arabic Intl polyfill locale data (PluralRules, NumberFormat, DateTimeFormat, RelativeTimeFormat) - Web: enable `"rtl": true` in `components.json` and regenerate all shadcn UI components to use CSS logical properties (`ms-*`, `me-*`, `ps-*`, `pe-*`, `text-start`, `text-end`) instead of physical `ml-*`/`mr-*`/`text-left` equivalents - Web: apply the same logical-property conversions to non-generated components (nav-bar, settings sections, title cards, hero banner, continue-watching card) - Web: set `document.dir` based on the active locale's RTL flag in the i18n initialiser and root route - Add `../../packages/i18n/src/po.d.ts` to native `tsconfig.json` includes so TypeScript accepts `.po` imports
This commit is contained in:
@@ -7,11 +7,17 @@ icon: Languages
|
||||
Sofa supports multiple languages for the web and mobile apps. The current supported locales are:
|
||||
|
||||
- English (source)
|
||||
- Arabic
|
||||
- Chinese
|
||||
- Dutch
|
||||
- French
|
||||
- German
|
||||
- Spanish
|
||||
- Hebrew
|
||||
- Italian
|
||||
- Japanese
|
||||
- Korean
|
||||
- Portuguese
|
||||
- Spanish
|
||||
|
||||
You can switch languages in **Settings > Language** on web or the mobile app. Sofa detects your browser or device language on first launch and defaults to it if supported. This setting is **not** saved to the server — it is only persisted to the current browser or device.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user