Nuzul is Arabic first: / sends visitors to /ar, laid out right to left. English lives at /en. Every page has a language switch that keeps you on the same page.
Where the words are
| What | Where |
|---|---|
| Interface texts (buttons, labels, errors, legal pages) | messages/ar.json, messages/en.json |
| Company name, tagline, about, address | Dashboard > Company settings (two fields each) |
| Destinations and stays: names, summaries, descriptions, house rules, season names | Dashboard > Stays (Arabic and English fields) |
| Documentation | docs/ar/*.md, docs/en/*.md |
Plural forms use ICU messages, so Arabic gets its six forms: {count, plural, =1 {ليلة واحدة} =2 {ليلتان} few {# ليالٍ} other {# ليلة}}.
Dates are formatted with Intl (ar-OM with Latin digits, en-GB), and prices with the currency of the company, e.g. 45.000 ر.ع. and OMR 45.000.
Right to left
The layout uses logical CSS (ms-, me-, ps-, start-, end-), so it mirrors itself in Arabic. Directional icons (chevrons, arrows) are flipped with rtl:rotate-180. Emails, phone numbers and codes are always shown left to right (dir="ltr"), and guest names and reviews use dir="auto" so an English review reads correctly on the Arabic site.
Adding a language
- Add the code to
localesinsrc/i18n/routing.ts, e.g.["ar", "en", "fr"]. - Copy
messages/en.jsontomessages/fr.jsonand translate it. - Text from the database has Arabic and English columns (
nameAr,nameEn, ...). Pages pick one withlocale === "ar" ? x.nameAr : x.nameEn. For a third language, add columns inprisma/schema.prisma(nameFr, ...), runnpx prisma db push, add the fields to the dashboard forms, and update the pickers. A simple alternative is to show English for every non-Arabic language. - Add
docs/fr/if you want the documentation in that language. - If the language is right to left, add it to
isRtlinsrc/i18n/routing.ts.