Internationalization, RTL, and Universal Design
Internationalization, RTL, and Universal Design
Universal design means building for the widest possible audience. That audience speaks thousands of languages, reads in multiple directions, and uses writing systems that vary wildly in character width, vertical spacing, and typographic conventions. Internationalization (i18n) is the engineering discipline that makes this possible. Done well, it is invisible. Done poorly, it excludes hundreds of millions of people.
RTL Layout Fundamentals
Right-to-left (RTL) scripts — Arabic, Hebrew, Persian, Urdu — are used by over 600 million people. Supporting RTL is not a niche concern. When a page switches to an RTL language, the entire layout must mirror:
- Text flows right to left.
- The reading order of UI elements reverses: navigation, sidebars, breadcrumbs, and action buttons mirror their positions.
- Icons with directional meaning (arrows, progress indicators, “back” buttons) must flip.
- Scrollbars, sliders, and progress bars reverse direction.
Implementing RTL with CSS
The dir="rtl" attribute on the <html> element triggers browser-level RTL behavior. Combined with CSS Logical Properties, layout mirroring becomes largely automatic:
/* Physical (breaks in RTL) */
margin-left: 16px;
padding-right: 24px;
text-align: left;
/* Logical (works in both directions) */
margin-inline-start: 16px;
padding-inline-end: 24px;
text-align: start;
CSS Logical Properties replace left/right with start/end and top/bottom with block-start/block-end. This approach handles RTL mirroring without separate stylesheets or directional overrides.
Bidirectional (Bidi) Text
Mixed-direction text — an English brand name within Arabic prose, or a URL within Hebrew text — requires the Unicode Bidirectional Algorithm. In most cases, the browser handles this correctly. Problems arise with:
- Neutrals: Punctuation, spaces, and numbers have no inherent direction. Adjacent to LTR and RTL text, they can be assigned to the wrong direction.
- Embedded code: Code snippets, email addresses, and file paths within RTL text may render in the wrong order.
Use the <bdo> element or unicode-bidi CSS property to force direction when the algorithm fails.
Text Expansion and Contraction
English is one of the most compact major languages. Translations into other languages routinely expand text length:
| Target Language | Typical Expansion |
|---|---|
| German | +30% |
| French | +20% |
| Finnish | +30-40% |
| Arabic | +25% |
| Japanese | -10-30% (fewer characters, but may need more height) |
Buttons, navigation items, form labels, and table headers must accommodate this expansion without overflowing, truncating, or overlapping. Fixed-width containers for text content are an internationalization failure.
Design strategies:
- Use flexible layouts (Flexbox, Grid) that grow with content.
- Test with pseudo-localization (replacing text with expanded placeholder characters) during development.
- Never truncate translated text without providing a way to access the full content (tooltip, expansion).
Accessibility Implications of Internationalization
Language Declaration
WCAG SC 3.1.1 (Language of Page, Level A) requires declaring the page language in the lang attribute. SC 3.1.2 (Language of Parts, Level AA) requires marking content in a different language:
<html lang="ar" dir="rtl">
<body>
<p>هذا نص عربي مع <span lang="en">English term</span> في المنتصف.</p>
</body>
</html>
Screen readers use language declarations to switch pronunciation engines. Without them, Arabic text read with an English pronunciation engine is incomprehensible.
Font and Typography
- Not all fonts support all scripts. System font stacks must include fallbacks for Arabic, CJK (Chinese, Japanese, Korean), Devanagari, and other scripts.
- Arabic and Devanagari scripts require more vertical space than Latin. Line height must accommodate taller glyphs. See our typography guide for baseline recommendations.
- CJK text does not use spaces between words. Line-breaking rules differ: breaks occur between any two characters, with specific prohibited break points.
Keyboard Input
Users of non-Latin scripts use different keyboard layouts, input methods (IMEs for CJK), and text entry patterns. Form inputs must accept and correctly handle:
- Unicode characters across all Basic Multilingual Plane and supplementary planes.
- Input method editor (IME) composition events (do not process incomplete IME input as final).
- Bi-directional text in single fields (an address field with both Arabic and English components).
Date, Number, and Currency Formats
Formats vary by locale:
| Element | US English | German | Arabic (Egypt) |
|---|---|---|---|
| Date | 04/05/2025 | 05.04.2025 | ٠٥/٠٤/٢٠٢٥ |
| Number | 1,234.56 | 1.234,56 | ١٬٢٣٤٫٥٦ |
| Currency | $1,234.56 | 1.234,56 € | ١٬٢٣٤٫٥٦ ج.م |
Use the Intl API in JavaScript for locale-aware formatting rather than hardcoding patterns.
Key Takeaways
- RTL support requires layout mirroring — use CSS Logical Properties to handle both directions from a single stylesheet.
- Text expansion (up to 40%) must be accommodated in all UI components.
- Declare page and content language for screen reader pronunciation switching (WCAG SC 3.1.1, 3.1.2).
- Font stacks must cover all target scripts with appropriate line-height adjustments.
- Use locale-aware APIs for dates, numbers, and currencies rather than hardcoded formats.
Next Steps
- Apply internationalization principles to responsive design that adapts to both direction and device.
- Ensure typography accommodates multi-script text.
- Review the universal design framework for how i18n fits into the broader strategy.
Sources
- WCAG 2.2 SC 3.1.1 Language of Page — The requirement for language declaration.
- W3C Internationalization: RTL Styling — W3C guidance on bidirectional text and RTL layout.
- MDN Web Docs: CSS Logical Properties — Reference for direction-agnostic CSS properties.
- WebAIM: Language and Accessibility — Practical guidance on language declarations for accessibility.
RTL implementation guidance adapted from W3C Internationalization best practices and the Material Design bidirectionality guidelines. WCAG requirements from Success Criteria 3.1.1 and 3.1.2.