HomeComputer ScienceBidi Reordering Lab: The Unicode Bidirectional Algorithm

Bidi Reordering Lab: The Unicode Bidirectional Algorithm

Build a mixed left-to-right / right-to-left token sequence and watch the real Unicode Bidirectional Algorithm (UBA) assign embedding levels and reorder it for display — the exact mechanism behind RTL support in every localized mobile app.

Computer Science3DModerate60 FPS📱 Mobile-adapted
mobile-localization ↗ Open standalone

Localizing a mobile app for Arabic or Hebrew users is not just translation — text that mixes right-to-left words with left-to-right words and numbers has to be reordered for display while its underlying storage order never moves, or copy-paste, search and screen readers all break. This lab implements the real embedding-level assignment and the L2 reversal rule from the Unicode Bidirectional Algorithm (UAX #9): build a token sequence of Latin words, Arabic/Hebrew words and numbers, choose a left-to-right or right-to-left paragraph base, and watch the 3D scene compute embedding levels (block height) and the resulting visual permutation, with connecting threads showing exactly which storage slot maps to which screen slot.

⚙ Under the hood

Build a mixed left-to-right / right-to-left token sequence and watch the real Unicode Bidirectional Algorithm assign embedding levels and reorder it for display — the exact mechanism behind RTL support in every localized mobile app.

localizationi18nunicodertlalgorithmstext-rendering

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)