Skip to main content
Nahwakayununa
Guide 02 / 021 min readLive site

Localization and Internationalization

Implementation details of Arabic RTL and English LTR bidirectional support in Nahwakayununa.

Bidirectional Architecture#

Localization for Nahwakayununa required supporting Arabic as a primary Right-to-Left (RTL) language alongside English as a Left-to-Right (LTR) language.

Bidirectional support impacts typography, spacing, navigation alignment, and grid ordering across all screen sizes.

Language State & i18next#

The application uses i18next to manage translation strings and locale selection:

  • Translation keys are organized into structured namespace objects for headers, footers, navigation, and activity sections.
  • When the active locale switches, the document root direction (dir="rtl" or dir="ltr") and language attribute (lang="ar" or lang="en") update accordingly.
  • Font styling adjusts between Arabic typographic weights and Latin font subsets to maintain clear visual hierarchy.

Responsive Directional Layouts#

Tailwind CSS directional classes and logical properties ensure that margins, paddings, and flex alignments mirror accurately:

  • Using start and end properties instead of fixed left and right offsets where directional mirroring is needed.
  • Ensuring navigation menus, icons, and list bullets orient correctly with the active reading direction.
  • Preserving symmetrical layouts for media cards and image galleries regardless of the selected language.