Arabic and RTL, without a plugin

The Merchant Engine ships French, English and Arabic. A store enables the locales it serves and picks the one that leads. Arabic pages mirror right to left, and every product, category, page and email field holds one value per locale in one database.

How it works

The locales are configuration, not code. The store configuration carries the locales the store serves, the default among them, and an rtlLocales list. The storefront reads that configuration at request time and sets lang and dir per page: dir="rtl" when the page locale is in the list, ltr otherwise. Two stores on the same build, one in Arabic and English, one in French, differ only in their configuration rows.

Every user-facing text is one field per locale. A product name, a category, a CMS page, a shipping method name, a notification template: each is stored as a JSON object keyed by locale, and the API resolves it against the request's Accept-Language with a fallback chain, so a field that has no Arabic value falls back rather than rendering empty. The admin renders one editing tab per locale on those fields, and the Arabic tab types right to left.

Money follows the store, not the locale. The currency, its symbol, its separators and its decimal places come from the same configuration, which is how a three-decimal currency such as the Kuwaiti or Bahraini dinar renders correctly instead of being rounded to two.

The URL carries the locale. Every storefront URL is prefixed with its locale, and the pages emit the hreflang links and canonical tags that tell a search engine the Arabic page and the French page are the same product.

storefront · product · Arabic, AED
A storefront product page in Arabic: the layout mirrored right to left, an Arabic font kit, and a price in dirhams with the symbol before the number.

Same build, right to left. A store that serves Arabic and English with Arabic as the default. The layout mirrors, the font kit changes, the dirham sits before the number. No code changed to get here.

Where to read the detail

Questions

Is Arabic a plugin or a translation pack?

Neither. French, English and Arabic are the three locale catalogues the engine ships with. A store picks the ones it serves and the one that leads; nothing is installed to add Arabic.

Can a store serve Arabic and French without English?

Yes. The store configuration carries the list of locales the store serves and the default among them. Any subset of the three, in any order, with any one of them as the default.

How does the storefront decide to mirror the page?

From the store configuration. The rtlLocales list names the locales written right to left, and the storefront sets dir="rtl" and lang on the page for a locale in that list. A store that serves Arabic and French mirrors its Arabic pages and leaves its French pages alone.

Do I need a second database or a second install for the second language?

No. Every user-facing field is one JSON column holding one value per locale, in one row, in one database. A product is one product with a name per locale, not two products.

Is the admin dashboard in Arabic too?

The admin interface itself is in English and is not mirrored. What it does carry is one editing tab per locale on every text field, and the Arabic tab types right to left, so a store owner writes Arabic content in the direction they read it.

What about invoices and email?

The invoice PDF is rendered by the API in the customer’s locale and direction, and transactional mail is sent from templates that carry a version per locale.

Last updated . Every claim on this page is read from a published source and cited beside it.