This site is under active development. Some services and pages may not be fully ready yet.

All documentation

Localization & RTL

EN/AR locale routing, translation file structure, RTL layout behavior, and adding new locales.

The platform ships in English and Arabic. The locale is the first path segment — /en/... or /ar/... — and middleware redirects a bare path to the visitor's locale.

Translations

  • Frontend strings live in frontend/messages/en.json and ar.json, grouped by feature.
  • Backend strings live under backend/lang/{locale}, used for validation messages and email.
  • Notification templates are stored per tenant and per locale in the database, so providers can reword customer email without editing files.

RTL

Arabic sets dir="rtl" on the document. Layouts use logical properties — start and end rather than left and right — so direction flips without a second stylesheet. Icons that imply direction are mirrored explicitly.

NoteDo not apply letter-spacing to Arabic text. It separates letters that should join and makes words hard to read.

Adding a locale

  1. 1

    Add the code to the routing config

    Register it in the frontend routing definition and in HOSTINVO_SUPPORTED_LOCALES.

  2. 2

    Copy and translate the message files

    Start from en.json; missing keys fall back to English rather than showing raw keys.

  3. 3

    Add backend language files

    Copy backend/lang/en and translate.

  4. 4

    Check direction

    Set RTL if the script needs it, and re-check any layout that assumed LTR.