Right-to-Left (RTL) Language Testing: Arabic, Hebrew, Farsi
RTL languages (Arabic, Hebrew, Farsi, Urdu, Pashto) flip the visual direction of UI. Testing them requires more than translating strings — layouts mirror, icons flip, scroll direction reverses, text a
RTL languages (Arabic, Hebrew, Farsi, Urdu, Pashto) flip the visual direction of UI. Testing them requires more than translating strings — layouts mirror, icons flip, scroll direction reverses, text alignment changes. Getting it right makes your app usable for 1+ billion speakers. Getting it wrong produces broken, embarrassing UI.
What changes in RTL
Layout
- Main axis direction: left-to-right becomes right-to-left
- Logical
margin-leftbecomes visualmargin-right - Flex / grid order reverses
- Text alignment reverses (left → right for languages reading RTL)
Icons
- Directional icons flip: arrow-back, arrow-forward, play button
- Non-directional icons stay the same: search, settings, user
Navigation
- Back gestures: swipe-from-right instead of swipe-from-left
- Tab bars may flip
- Drawer menus open from right
Input
- Text input reads right-to-left
- Cursor positioning
- Selection direction
What to test
Layout flip
- Screen renders mirrored layout
aligned right- Body text aligned right
- Buttons right-aligned where appropriate
- Margins / paddings respect logical properties
Icons
- Back / forward arrows flipped
- Play / pause (audio / video control) flipped if appropriate
- Rating stars / progress bars flipped
- Language-specific icons (decimal separators, currency) appropriate
Text
- Hebrew / Arabic / Farsi renders correctly
- Mixed RTL / LTR (e.g., Arabic paragraph with English name) renders correctly
- Numbers in mixed direction respect convention (Latin numerals typically stay LTR)
- Diacritics / vowel marks render correctly
- Bidirectional text (BIDI) handled per Unicode BIDI algorithm
Input
- Text input starts at right edge
- Cursor at right edge on empty input
- Paste works with BIDI content
- Selection direction natural
Forms
- Label-input relationship preserved (label above, or to the right)
- Error messages aligned correctly
- Required indicator (*) on appropriate side
Navigation
- Back swipe gesture direction appropriate
- Tab navigation direction correct
- Side menu opens from right
Scrolling
- Horizontal scroll (carousels) reverses or stays (design decision)
- Scroll-to-top still top
- Infinite scroll loads appropriately
Images
- Photos not flipped (people, places, products)
- Illustrations with implicit directionality considered
- Screenshots from the app (recursive!) in correct orientation
Common bugs
Hardcoded left/right
/* Bad — does not flip in RTL */
.button { margin-left: 10px; }
/* Good — logical property flips correctly */
.button { margin-inline-start: 10px; }
Icons not flipped
Back arrow stays pointing left in RTL context. Looks like forward arrow.
Fix: Use direction-aware icon variants, or CSS transform: scaleX(-1) on directional icons in RTL.
Mixed language rendering
"Your invoice 12345 is paid" in Arabic should render with appropriate BIDI — numerals stay LTR within RTL paragraph.
Fix: Trust the platform's BIDI algorithm. Wrap as with appropriate dir attributes only when needed.
Layout borders / shadows
One-sided shadow (box-shadow: -5px 0 10px) does not flip automatically.
Fix: Use logical properties or manually flip in RTL stylesheet.
Progress bars / sliders
Filling direction. In RTL, should fill right-to-left.
Fix: transform-origin: right or logical property equivalents.
How to test
Translation files
- Maintain Arabic / Hebrew / Farsi translations
- Test with full translation, not machine-translated placeholder
Pseudolocalization
Pseudolocale that flips direction without actual translation, exposes layout issues:
Test button → tseb ttub (reversed for quick visual check)
Real devices / simulators
- iOS simulator: language + region to Arabic / Hebrew
- Android emulator: locale to Arabic / Hebrew
Screenshots
Capture every screen in RTL. Review for:
- Layout flip
- Icon direction
- Text alignment
User testing
Native RTL speaker reviews. Catches nuances automation misses.
Tools
CSS
direction: rtlon html / body- Logical properties (
margin-inline-start,padding-block-end) ::dir(rtl)selector (modern browsers)
Android
- RTL support added as
android:supportsRtl="true"in manifest - Use
start/endinstead ofleft/rightin layouts - AppCompat / Material Components handle most flipping
iOS
- Auto Layout handles RTL automatically
semanticContentAttributefor individual overridesUIImage.imageFlippedForRightToLeftLayoutDirection()for manual icon flipping
Flutter
Directionality.of(context)returns current directionAlignment.centerStart/centerEndinstead ofleft/right
How SUSA tests RTL
SUSA runs explorations with locale set to Arabic / Hebrew. Screenshot diff vs LTR session surfaces layout issues. Accessibility_user persona verifies screen reader behavior in RTL.
susatest-agent test myapp.apk --locale ar --persona curious --steps 200
Common production bugs
- App opens LTR layout even with RTL locale — supportsRtl missing
- Some screens RTL, others LTR — incomplete migration
- Icons all flipped, including non-directional — over-aggressive flipping
- Product photos flipped — looks like mirror, alien
- Input starts at left in RTL field — text goes weird direction
RTL support is not optional for global apps. Test early, test thoroughly, get native review.
Test Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free