Lesson 7 / الدرس 7

Arabic and Latin on one page / العربية واللاتينية في صفحة واحدة

Most design advice is written by people who have never set two directions on one page. Here is what actually changes when your product has to work in both — and it is more than mirroring the layout.

معظم نصائح التصميم كتبها من لم يضبطوا اتجاهين في صفحة واحدة قط. وهذا ما يتغيّر فعلًا حين يجب أن يعمل منتجك بالاثنين — وهو أكثر من عكس التخطيط.

A bilingual product is not an English product with a translated copy. The two scripts have different proportions, different comfortable line heights, different relationships to the baseline, and they run in opposite directions — so a layout tuned for one is, at best, acceptable in the other. The work is to design one system that serves both, not to design in English and then check the Arabic.

What changes, and what does not

ThingIn Arabic
Text directionRight to left — and so does the whole layout that frames it
Line heightWants 1.7–1.9 where Latin is comfortable at 1.5
Optical sizeReads smaller; usually set 5–10% larger
BoldWeaker as a signal — Arabic bolds less distinctly than Latin
ItalicDoes not exist. Never fake it by slanting
ALL CAPSDoes not exist. There is no upper case
NumbersBoth ٠١٢ and 012 are used; pick one and be consistent
Letter-spacingBreaks the script — letters must join. Never apply it

The last two rows are the ones that produce visible damage. Letter-spacing on Arabic disconnects joined letters and makes words unreadable, and it is applied by accident all the time by a global rule meant for headings.

<div style="font-family:system-ui; font-size:20px">
  <!-- a heading rule written for Latin, applied to everything -->
  <p style="letter-spacing:.08em" dir="rtl" lang="ar">تعلّم بناء الويب</p>
  <p style="letter-spacing:.08em">Learn to build for the web</p>
</div>

<hr>

<div style="font-family:system-ui; font-size:20px">
  <!-- tracking on Latin only; Arabic left joined -->
  <p dir="rtl" lang="ar" style="letter-spacing:normal; line-height:1.8">تعلّم بناء الويب</p>
  <p style="letter-spacing:.08em">Learn to build for the web</p>
</div>
Run it and look at the first Arabic line. The letters have come apart — the joins that make Arabic legible are gone, and what is left is a row of shapes. This is the single most common way a Latin-first stylesheet damages Arabic, and it is invisible to anyone not reading it.

Mixing the two in one line

Arabic sentences routinely contain Latin — product names, code, numbers — and the browser handles the reordering itself, correctly, as long as you tell it the direction of the surrounding text. Set dir and lang on the element, and then trust the algorithm. Where it goes wrong is punctuation at the boundary: a full stop after a Latin word inside an Arabic sentence can jump to the wrong end, and the fix is to mark the element correctly rather than to reorder the text by hand.

Try it live / جرّب بنفسك

Preview / المعاينة

Check yourself / اختبر نفسك

1. Why must letter-spacing never be applied to Arabic?

2. Which icon should NOT be mirrored in a right-to-left layout?

3. What is the recommended order of work for a bilingual layout?

Your task / مهمتك

Build one small card — a title, a line of description, a number and a button — that works correctly in both directions. Show it twice, once with dir="rtl" and once without, and list every property you had to change between them.

ابنِ بطاقة صغيرة واحدة — عنوان وسطر وصف ورقم وزر — تعمل عملًا صحيحًا في الاتجاهين. وأظهرها مرتين، مرة بـdir="rtl" ومرة بدونه، واسرد كل خاصية اضطررت إلى تغييرها بينهما.

  • The same card shown in both directions البطاقة نفسها معروضة في الاتجاهين
  • No letter-spacing on the Arabic, and a larger line height for it لا تباعد أحرف في العربية، وارتفاع سطر أكبر لها
  • A list of what had to change, and what deliberately did not قائمة بما وجب تغييره، وما لم يتغيّر عن قصد
How do you want to submit? / كيف تريد التسليم؟