Skip to content

refactor: Standardize localization config to simplify adding new languages #133

@O2sa

Description

@O2sa

Adding new languages currently requires updating multiple places. We should standardize the localization configuration into a single source of truth where each supported language defines its value, label, and layout direction (RTL/LTR).

Tasks

  • Define a centralized LOCALES array (e.g., in lib/i18n.ts or a separate config file).
  • Ensure each locale object includes a dir property ('ltr' or 'rtl').
  • Update LanguageProvider and LanguageSwitcher to use this new configuration.
  • Replace any hardcoded RTL logic (e.g., locale === 'ar') with the new dir property.
  • Update CONTRIBUTING.md with a guide on how to add new languages and contribute to localization.> [!NOTE]

🚀 CONTRIBUTIONS ARE WELCOME!

If you want to get this issue assigned to you, just comment 'assign me'.
You will be assigned to the issue instantly via our GitHub Actions bot. Happy coding! ✨

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions