Skip to Content

Glossary · Arabic, Persian & RTL

Bidirectional text

Also: bidi

Definition

Bidirectional text: Text that mixes right-to-left and left-to-right runs, such as an Arabic sentence containing a Latin handle or ticker. Browsers order it with the Unicode Bidirectional Algorithm.

What it means

The Unicode Bidirectional Algorithm, which browsers apply, gives letters a strong direction and treats punctuation and spaces as neutral. A run of neutrals takes the direction of the strong text around it; where the two sides disagree, it takes the paragraph's direction1. That rule is why an @ placed between Arabic text and a Latin handle ends up on the wrong side of it.

The remedy is isolation: marking a fragment so it is laid out as one unit that neither disturbs nor is disturbed by the text around it. In HTML that means an element with dir="ltr" or dir="rtl" when the direction is known, and dir="auto" or the bdi element when it is not2.

Example

In a right-to-left paragraph, "@yourhandle" without isolation renders as "yourhandle@". Wrapped in a bdi element, it renders as written. A ticker such as XAUUSD wrapped with dir="ltr" stays attached to its label.

Why it matters to an IB

Every IB page in Arabic or Persian carries Latin fragments: the IB's handle, the broker's name, the instruments they discuss. Each one printed backwards tells a reader the page was not made for them. See publishing right-to-left.

Sources

First-party figures are Gravity's own observations of its product. External sources were read on the date shown.

  1. Unicode Standard Annex #9: Unicode Bidirectional Algorithm — Unicode Consortium

    Standard · read 28 September 2026

  2. Inline markup and bidirectional text in HTML — W3C Internationalization

    Standard · read 28 September 2026

In the Journal

Where “Bidirectional text” comes up

  1. 01

    Arabic, Persian & RTLExplainer7 min read

    Arabic and Persian typography for the web

    Arabic letters join, reach further above and below the line than Latin, and can read smaller at the same size. Type settings made for English break them in ways a native reader sees at once.

  2. 02

    Arabic, Persian & RTLGuide9 min read

    Publishing right-to-left: an Arabic and Persian website that reads natively

    Direction is one attribute. Reading natively is everything after it — the handles, tickers, numbers and type that run through an Arabic or Persian page.

Start

One profile is all Gravity needs to begin.

Give Gravity a public Instagram, TikTok or YouTube profile. It reads it and builds your website in your own language — in minutes, with nothing on it you can't stand behind.