Skip to content
Nizam team5 min readEngineering

Arabic-first interfaces: what RTL really involves

Right-aligned bars of decreasing length, with a small arrow pointing left.
In this article

Most bilingual products start in English and add Arabic later. The result is familiar: the layout flips, but phone numbers display in the wrong order, a full stop jumps to the wrong end of a sentence, and the Arabic text looks cramped next to its English counterpart. Designing Arabic-first means treating these as design decisions from the first screen, not as bugs to fix just before launch.

Mirroring is a layout decision, not a stylesheet trick

Start by setting the document direction and language at the root, with dir="rtl" and lang="ar" on the html element, rather than flipping components one by one. Then build the layout with logical CSS properties: margin-inline-start instead of margin-left, padding-inline-end instead of padding-right. Logical properties follow the document direction, so one stylesheet serves both languages and you avoid a second set of overrides that slowly drifts out of date.

Not everything should mirror. Elements that express direction within the interface do: back and forward arrows, breadcrumbs, progress steppers, carousels, the side a drawer slides in from. Elements that depict things in the physical world usually do not: a clock, a checkmark, media playback controls, a logo. Charts deserve a decision of their own. A time series in an Arabic dashboard can reasonably run either way, but the direction must be consistent across the product and agreed with the people who read it.

Bidirectional text needs explicit handling

Arabic interfaces are rarely pure Arabic. A single line might hold an Arabic sentence, a Latin brand name, an invoice number like INV-2026-0041, an email address and a price. The Unicode bidirectional algorithm decides how these runs are ordered, and it works from the characters it sees. When the context is ambiguous, punctuation lands at the wrong end of the line and the groups of a spaced phone number appear in reverse order.

The fixes are well known, but they have to be applied on purpose:

  • Isolate values you insert into a sentence. Wrap names, codes and numbers in a bdi element, or apply unicode-bidi: isolate, so they cannot disturb the text around them.
  • Give user-generated content dir="auto", so a comment written in English displays left to right inside an Arabic page.
  • Force left-to-right direction on fields whose content is always Latin: email, URL, IBAN and phone number. Keep their alignment consistent with the rest of the form.
  • Build a test page of awkward mixed strings and check every new component against it.

Choose numerals deliberately

Arabic text is written with two common digit sets: Western digits, 0 to 9, and Eastern Arabic digits, ٠ to ٩. Usage varies by country, sector and audience, and many Gulf products use Western digits throughout. Pick one convention per product, document it, and apply it everywhere, including charts, tables and generated PDFs.

Formatting libraries need explicit instructions. Depending on the locale and the runtime, formatting a number for Arabic can produce Eastern Arabic digits by default. In JavaScript, a locale tag such as ar-SA-u-nu-latn asks for Latin digits while keeping Arabic month and day names. Test the output in every browser you support.

Input is the other half. Users on an Arabic keyboard will type Eastern Arabic digits, and some will type the Persian variants of those digits. Accept all of them and normalize to one form before validating or storing. A national ID or mobile number that is rejected because of its digit set looks like a broken system to the person typing it.

Dates need the same care. Where the business works with Hijri dates, show them alongside Gregorian dates and store one unambiguous value underneath. Check currency display too: the Saudi riyal now has an official symbol, and font support for it is still uneven, so test it before you rely on it.

Arabic typography is not Latin typography

Arabic letters connect, change shape according to their position, and carry dots and marks above and below the line. At the same font size, Arabic usually looks smaller and denser than Latin text, so it often needs a slightly larger size and more generous line height. Set these values per language instead of sharing one.

A few rules prevent most problems:

  • Never apply letter-spacing to Arabic. Extra spacing breaks the joins between letters.
  • Avoid synthetic italics and uppercase transforms. Arabic has no capital letters, and Arabic slanted by the browser looks broken. Use weight or color for emphasis.
  • Avoid full justification in interfaces. Without careful kashida handling it leaves uneven gaps.
  • Choose an Arabic typeface designed for screens, with a Latin companion whose weights and vertical metrics match, so mixed lines sit comfortably together.
  • Subset and preload fonts. Arabic font files are larger than Latin ones, and a late font swap causes visible layout shift.

Forms are where trust is won or lost

Forms collect the data the rest of the system depends on, so this is where Arabic-first design matters most.

  • Names: Arabic names often have several parts. A single full-name field, or a flexible structure, works better than a rigid first name and last name. Accept both scripts.
  • Phone numbers: accept local formats with a leading zero as well as international ones, and normalize to one format on save.
  • Search: normalize Arabic before matching. Treat the alef forms أ إ آ ا as equivalent, match ة with ه and ى with ي, and ignore diacritics and tatweel. Otherwise a person searching for a customer name will miss records that are plainly there.
  • Sorting: sort lists with a proper Arabic collation, not by raw character codes.
  • Messages: write validation messages in Arabic from the start, in plain and polite language, and avoid phrasing that assumes the user's gender where you can.

Finally, test with real content. Placeholder text hides every problem described here. Use real Arabic product names, real addresses and customer names of realistic length, and review the screens with people who use Arabic at work every day. The issues they spot in an hour are the ones customers would otherwise report for months.