Skip to content

Internationalization

Bosaj edited this page Aug 20, 2026 · 4 revisions

Internationalization & RTL Guidelines

The application supports three official languages: Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ© (Arabic), FranΓ§ais (French), and English.


🌐 Supported Languages & Layouts

Code Language Layout Direction Font Family
ar Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ© (Arabic) RTL (dir="rtl") Tajawal, Cairo, system-ui
fr FranΓ§ais (French) LTR (dir="ltr") Inter, system-ui
en English LTR (dir="ltr") Inter, system-ui

πŸ“– Managing Translation Keys

All static UI strings are defined in src/translations.js. Keys must be provided in all three language dictionaries:

export const translations = {
  ar: {
    gallery: 'Ω…ΨΉΨ±ΨΆ Ψ§Ω„Ψ΅ΩˆΨ±',
    donate: 'ΨͺΨ¨Ψ±ΨΉ Ψ§Ω„Ψ’Ω†'
  },
  fr: {
    gallery: 'Galerie',
    donate: 'Faire un don'
  },
  en: {
    gallery: 'Gallery',
    donate: 'Donate Now'
  }
};

πŸ“ RTL Styling Rules

  1. Direction State: LanguageContext updates document.documentElement.dir and document.documentElement.lang on language change.
  2. Icons: Directional icons (arrows, chevrons) must include dynamic rotation:
    <FaArrowRight className={language === 'ar' ? 'rotate-180' : ''} />
  3. Marquee Exception: The gallery marquee container MUST remain dir="ltr" to preserve continuous CSS translation offsets.

Clone this wiki locally