Skip to content
Mohammad Awadallah
All posts

Right-to-left Arabic interfaces: common mistakes and how to fix them

Practical lessons from building an Arabic-first bilingual site: direction, fonts, letter-spacing, and mixing Arabic and English on one line.

3 min readAlso in:العربيةFrançais

Most “Arabic” websites are built in English first and flipped at the end. It shows in the details: an arrow pointing the wrong way, letters pulled apart, a phone number reversed. These are mistakes I ran into while building this site, and how I solved them.

1. Start with Arabic, don’t flip at the end

When Arabic is the default from the first line, direction becomes part of the design rather than a late fix. In practice: every page sets lang="ar" and dir="rtl" on the html element itself, not on some inner section.

2. Use logical properties instead of left and right

Instead of margin-left and padding-right, use margin-inline-start and padding-inline-end — in Tailwind, ms-, pe-, start- and end-. They flip automatically with the page’s direction, so you never maintain a separate set of styles for Arabic.

My rule: no left or right in layout, ever. If you think you need “right”, ask whether you mean “start” or “end”.

3. Letter-spacing breaks Arabic

letter-spacing looks great on English headings, but it pulls joined Arabic letters apart and mangles the word. And uppercase means nothing in Arabic.

The fix: neutralize these on Arabic pages from one place, instead of remembering it on every element:

:root[lang="ar"] .tracking-widest {
  letter-spacing: normal;
}

4. Directional symbols mirror themselves

Characters like >, ( and [ are “mirrored”: the browser flips them automatically in Arabic context. That’s right for brackets, but it surprises you with symbols that carry meaning. A terminal-style line like > about reads naturally in English; in Arabic it becomes an arrow pointing away from the text.

So I didn’t carry the terminal style into Arabic. On this site it’s replaced by section headings numbered in Arabic-Indic digits with a sonar ping — an idea that suits both the language and the site.

5. Isolate English runs inside Arabic lines

Put an English word or a URL inside an Arabic sentence and punctuation or a cursor can jump somewhere unexpected. Isolate the English run with a bdi element or dir="ltr":

<bdi dir="ltr">awadallah.vip</bdi>

And code blocks always stay left-to-right, even inside an Arabic article.

6. Fonts: the English face isn’t enough

Many beautiful fonts have no Arabic glyphs, so the browser falls back to whatever it finds. Pick an Arabic face deliberately, put it in the font stack as the intended fallback, and make it the primary face on Arabic pages.

Watch glyph placement in small elements, too: a letter like “ع” can sit below the center of a round button because the font is designed around a different baseline. It needs a small optical nudge.

7. Even 3D has a direction

On this site the whale swims in the reading direction: toward the left in Arabic, toward the right in English. A small detail, but it makes the whole page move the same way the reader’s eye does.

The bottom line

A proper Arabic interface isn’t a translation of the copy. It’s a decision, from the start, that direction, type and even motion follow the language — and an Arabic reader notices every small detail that was skipped.