Bidirectional Text
النص ثنائي الاتجاه
When RTL and LTR scripts share a line
Bidirectional (bidi) text occurs whenever Arabic (right-to-left) and Latin (left-to-right) appear in the same line. This is common in modern digital interfaces, academic writing, branding, and any context where Arabic text includes English terms, URLs, code, or product names. The Unicode Bidirectional Algorithm (UBA) automatically determines the visual order of mixed-direction text.
Common Pitfalls
Bidi can produce unexpected results: punctuation may jump to the wrong side, parentheses can appear reversed, and numbers inside Arabic sentences can shift position depending on the algorithm's interpretation. Designers and developers working with bidi text need to understand concepts like base direction, directional overrides, and embedding levels. Testing with real mixed-direction content — not just placeholder text — is essential to catch layout issues before they reach users.