What is RTL (Right-to-Left)?
RTL refers to scripts written right to left, most prominently Arabic and Hebrew, and languages written in the Arabic script such as Persian and Urdu. Supporting an RTL locale means more than translating strings: the reading direction of the whole interface flips, so layout, alignment, icons with directional meaning, and navigation order should mirror.
On the web, the foundation is the dir attribute. Setting dir="rtl" on the html element flips the document's base direction, and CSS logical properties (margin-inline-start instead of margin-left, text-align: start instead of left) let one stylesheet serve both directions. Tailwind CSS supports logical properties and rtl:/ltr: variants for the cases that still need explicit handling.
Not everything mirrors: numbers, embedded Latin text, media player controls, and most brand assets keep their orientation. Getting those exceptions right is where mixed-direction text rules (BiDi) come in, and where testing with a real RTL locale beats guessing.
{{-- Blade layout: flip direction for RTL locales --}}
@php($rtl = in_array(app()->getLocale(), ['ar', 'he', 'fa', 'ur']))
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ $rtl ? 'rtl' : 'ltr' }}">