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.
Adding a locale
- 1
Add the code to the routing config
Register it in the frontend routing definition and in HOSTINVO_SUPPORTED_LOCALES.
- 2
Copy and translate the message files
Start from en.json; missing keys fall back to English rather than showing raw keys.
- 3
Add backend language files
Copy backend/lang/en and translate.
- 4
Check direction
Set RTL if the script needs it, and re-check any layout that assumed LTR.