--- id: 1-3 title: 1-3 Bilingual Infrastructure (Arabic/English) status: Done date: 2026-09-27 parent: 1 --- ## Description As a user (admin or client), I want full bilingual support with Arabic as primary and English as secondary language, So that I can use the platform in my preferred language with proper RTL/LTR layout. Context: Integrates with: Laravel localization, Tailwind CSS, user preferences; Technology: Laravel lang files, Tailwind RTL, Google Fonts; Follows pattern: Laravel localization best practices. Full implementation history: docs/stories/story-1.3-bilingual-infrastructure.md ## Acceptance Criteria - [ ] Language files for Arabic (ar) and English (en) - [ ] Language toggle in navigation (visible on all pages) - [ ] User language preference stored in `users.preferred_language` - [ ] Guest language stored in session (persists across page loads) - [ ] RTL layout for Arabic, LTR for English - [ ] All UI elements translatable via `__()` helper - [ ] Language switch preserves current page (redirect back to same URL) - [ ] Form validation messages display in current locale - [ ] Missing translations fall back to key name (not break page) - [ ] Arabic: DD/MM/YYYY format - [ ] English: MM/DD/YYYY format - [ ] Both: 12-hour time format (AM/PM) - [ ] Both: Western numerals (123) - no Arabic numerals - [ ] Arabic fonts: Cairo or Tajawal (Google Fonts) - [ ] English fonts: Montserrat or Lato (Google Fonts) - [ ] Font weights: 300, 400, 600, 700 - [ ] font-display: swap for performance - [ ] Language middleware sets locale from user preference or session - [ ] Direction attribute (`dir="rtl"` or `dir="ltr"`) on HTML element - [ ] Tailwind RTL utilities working - [ ] Forms align correctly in both directions - [ ] No hardcoded strings in views - [ ] All translation keys organized by feature - [ ] Tests verify language switching - [ ] No layout breaks when switching languages