Quick answer: To support Arabic properly, set dir="rtl" and lang="ar" on the document, replace left/right CSS with logical properties (margin-inline-start, padding-inline-end, inset-inline-start), mirror directional icons, use an Arabic-friendly font, format numbers, dates and currency with Intl, and test with real Arabic content – not translated placeholders.
Arabic is the official language of Saudi Arabia and the Gulf, and users expect apps that feel native, not "flipped English". Government platforms and most large Saudi companies require full Arabic support. This guide gives you a practical RTL checklist for web and mobile developers.
1. Document direction and language
<html lang="ar" dir="rtl">- Switch both attributes when the user changes language.
- For mixed content (English product names inside Arabic text), wrap them with
<bdi>ordir="auto"so punctuation does not jump. - Input fields for emails, URLs, IBANs and code should be
dir="ltr"even in Arabic UI.
2. Use CSS logical properties
Avoid | Use instead |
|---|---|
margin-left | margin-inline-start |
padding-right | padding-inline-end |
left: 0 | inset-inline-start: 0 |
text-align: left | text-align: start |
border-left | border-inline-start |
With logical properties, one stylesheet works for both directions. Flexbox and Grid already follow the document direction automatically.
Tailwind CSS
Use the logical utilities (ms-4, me-2, ps-6, pe-3, start-0, end-0, text-start) and the rtl: / ltr: variants for special cases such as rtl:rotate-180.
3. Mirror the right things (and only those)
- Mirror: back/forward arrows, chevrons in lists, progress direction, sliders, breadcrumbs, the side of navigation drawers.
- Do not mirror: logos, media play buttons, clocks, checkmarks, phone and charts' time axes in many cases, and anything representing real-world objects.
- Charts: Arabic readers often accept left-to-right time axes, but legends and labels should be right-aligned.
4. Typography
- Choose fonts designed for Arabic: Noto Sans Arabic, IBM Plex Sans Arabic, Cairo, Tajawal, Almarai.
- Arabic needs slightly larger size and more line-height (1.6–1.8) for readability.
- Never use letter-spacing on Arabic text – it breaks the connected letters.
- Avoid ALL CAPS styling rules; Arabic has no case.
- Do not cut Arabic words with
text-overflowmid-word in narrow badges; allow wrapping.
5. Numbers, dates and currency
new Intl.NumberFormat('ar-SA', { style: 'currency', currency: 'SAR' }).format(1250.5);
// "١٬٢٥٠٫٥٠ ر.س."
new Intl.NumberFormat('ar-SA-u-nu-latn', { style: 'currency', currency: 'SAR' }).format(1250.5);
// Latin digits with Arabic formatting
new Intl.DateTimeFormat('ar-SA-u-ca-gregory', { dateStyle: 'long' }).format(new Date());- Decide whether to show Arabic-Indic digits (٠١٢٣) or Latin digits (0123). Many Saudi apps use Latin digits for prices and phone numbers; government documents often use Arabic-Indic. Let the design system decide and be consistent.
- Always parse user input that may contain Arabic-Indic digits – convert them to Latin before validation.
const toLatinDigits = s => s.replace(/[٠-٩]/g, d => '٠١٢٣٤٥٦٧٨٩'.indexOf(d));6. Translation and content
- Use ICU message format for plurals – Arabic has six plural forms (zero, one, two, few, many, other).
- Never concatenate translated strings ("You have" + n + "messages"); word order changes in Arabic.
- Arabic text is often 20–30% longer or shorter; design flexible buttons.
- Hire a native Saudi/Gulf reviewer – machine translation often sounds unnatural or too formal.
7. Mobile specifics
- Android: add
android:supportsRtl="true"and usestart/endinstead ofleft/rightin layouts. - iOS (SwiftUI/UIKit): use leading/trailing constraints; SwiftUI mirrors automatically. Use
.flipsForRightToLeftLayoutDirection(true)on directional images. - Flutter: use
Directionality,EdgeInsetsDirectionalandAlignmentDirectional. - React Native:
I18nManager.forceRTL(true)requires an app restart – plan the language switch UX.
8. Testing checklist
- Switch every screen to Arabic and screenshot it.
- Check forms: labels, validation messages, error icons, phone (+966) fields.
- Check tables: first column should be on the right.
- Check PDFs and emails – often forgotten and broken.
- Test with long real Arabic names and addresses.
- Test screen readers (VoiceOver, TalkBack) in Arabic.
Summary
lang="ar" dir="rtl"+ logical CSS properties.- Mirror directional UI, not logos or media icons.
- Arabic fonts, no letter-spacing, generous line-height.
Intlfor numbers, dates and SAR currency.- ICU plurals and native review for translations.