Localizing a website into Arabic, Hebrew, Persian, or Urdu involves more than translating words—it requires flipping your entire user interface from Left-to-Right (LTR) to Right-to-Left (RTL).
Navigation bars, sidebar menus, form inputs, chevron icons, and button alignments must mirror horizontally to create a natural reading flow for native users.
1. Using CSS logical properties
Modern CSS logical properties replace directional coordinates with flow-relative directions, making RTL adaptation straightforward:
/* Legacy Directional CSS (Requires manual overrides) */
.card { margin-left: 20px; text-align: left; }
/* Modern CSS Logical Properties (Auto-adapts to RTL) */
.card { margin-inline-start: 20px; text-align: start; }
2. Automated RTL attribute injection
When an RTL language is active, TranslateBeam TDN automatically updates the root HTML tag with dir="rtl" and lang="ar":
<html lang="ar" dir="rtl">
This signals the browser layout engine to mirror flexbox containers, table columns, and text alignment automatically without requiring duplicate stylesheets.