# Arabic Localization Foundations This ExecPlan follows `docs/PLANS.md`. ## Purpose / Big Picture Ship i18n plumbing for `ar-sa` first (locale selection, RTL behavior, user preference), with full translation breadth deferred. ## Progress - [x] (2026-02-27 00:00Z) Plan created. - [x] (2026-02-28 12:20Z) Backend locale middleware + user preference landed. - [x] (2026-02-28 12:30Z) Frontend i18n + RTL switching landed. - [x] (2026-02-28 12:40Z) Basic tests/docs updated. - [ ] Complete translation coverage and broader RTL QA as features expand. ## Surprises & Discoveries - Observation: none critical after implementation. Evidence: targeted locale/RTL tests passed for initial scope. ## Decision Log - Decision: `ar-sa` default locale with `en` fallback. Rationale: KSA-first product target. Date/Author: 2026-02-27/Codex - Decision: deliver foundations first, defer full string coverage. Rationale: reduce churn while core product flows are still evolving. Date/Author: 2026-02-28/Codex ## Outcomes & Retrospective Foundations complete; translation completeness remains open. ## Context and Orientation - Backend locale settings/middleware: `backend/salon_api/settings.py`, `backend/apps/accounts/middleware.py` - Frontend i18n/RTL: `frontend/src/i18n/`, `frontend/src/main.jsx`, `frontend/src/styles.css` ## Plan of Work Next phase: expand string coverage and run end-to-end RTL checks on all added routes/components. ## Validation and Acceptance - Backend: locale header behavior matches user preference/`Accept-Language`. - Frontend: language toggle sets `lang` + `dir`, persists across refresh. - Commands: - `cd backend && python3 -m pytest` - `cd frontend && npm run test` ## Idempotence and Recovery Locale config is additive and safe to reapply; translation catalogs can be regenerated.