2026-10-04 · 4 min
Building a bilingual site that actually mirrors
Switching a page to Arabic is more than translating text. These are the habits that make the layout, icons and motion flip correctly.
Our own site is English and Arabic from the first line of code. The lesson we keep repeating: right-to-left is a layout property, not a translation file.
Set direction once, at the top
The page wrapper carries dir="rtl" or dir="ltr", and the document element gets the matching lang and dir. Browsers, screen readers and CSS all read from the same place, so nothing needs to be flipped by hand.
Use logical properties, not left and right
Margins, padding and positions are written as start and end (ms-, me-, start-, end- in Tailwind) instead of left and right. A badge pinned to the start corner then sits bottom-left in English and bottom-right in Arabic without a single extra rule.
<div class="absolute bottom-6 start-6 ms-2">…</div>Flip what carries direction, keep what does not
- Arrows, chevrons and "next" icons mirror in right-to-left. Logos, play buttons and clocks do not.
- Coordinates, phone numbers and code stay left-to-right inside an Arabic sentence, so we wrap them in a small dir="ltr" island.
- Animation direction mirrors too: a card that slides in from the start edge should still come from the start edge.
Give Arabic its own typeface
Our English headlines use a display serif that has no Arabic letters, so Arabic falls back to IBM Plex Sans Arabic at a heavier weight. Letter-spacing is reset to zero, because tracking breaks Arabic joins.
Test it like a feature
Flip the language, then scroll the whole page at phone width. Most mistakes only show in the lower sections and in modals.