If you build storefronts for clients in the Gulf, sooner or later someone asks for an Arabic version of their Shopify store. Shopify Markets and the translation tools handle the words, but the theme has to handle direction. Right-to-left (RTL) support is where many otherwise solid themes fall apart: arrows point the wrong way, carousels slide backwards, prices wrap strangely and icons sit on the wrong side of their labels.
Here are the lessons that have saved us the most time when building bilingual themes.
1. Set the direction once, at the root
Do not sprinkle dir="rtl" across individual sections. Set it on the <html> element based on the active locale, so the whole document flips consistently:
{%- liquid assign rtl_locales = 'ar,he,fa,ur' | split: ',' assign page_dir = 'ltr' if rtl_locales contains request.locale.iso_code assign page_dir = 'rtl' endif -%} <html lang="{{ request.locale.iso_code }}" dir="{{ page_dir }}"> With direction set at the root, the browser handles text alignment, table columns and form fields for you. Your job becomes fixing the places where the CSS fights the browser.
2. Replace physical CSS properties with logical ones
The single biggest improvement is moving from left/right to logical properties. Instead of:
.card__badge { left: 12px; } .price { margin-right: 8px; text-align: left; } write:
.card__badge { inset-inline-start: 12px; } .price { margin-inline-end: 8px; text-align: start; } margin-inline-start, padding-inline-end, inset-inline-start, border-inline-start and text-align: start all follow the document direction automatically. One stylesheet now works for both languages, and you avoid maintaining a separate rtl.css file that drifts out of sync.
Browser support for logical properties is excellent in every evergreen browser, so there is little reason to avoid them on new builds.
3. Flip directional icons, not all icons
Arrows, chevrons and "back" icons should mirror in RTL. Search, cart, user and close icons should not. A small utility class keeps this explicit:
[dir="rtl"] .icon--directional { transform: scaleX(-1); } Apply icon--directional only to icons that imply movement or reading order. Logos, product images and anything containing Latin text should never be flipped.
4. Watch out for sliders and JavaScript positioning
Carousel libraries often calculate positions with scrollLeft or translate values that assume left-to-right flow. Before shipping:
- check whether your slider library has an RTL option and pass it based on
document.dir, - test swipe gestures on a real phone, because swipe direction should feel natural for Arabic readers, and
- check
scrollLeftbehaviour, since browsers report negative values in RTL containers.
A quick guard in your theme JavaScript helps:
const isRTL = document.documentElement.dir === 'rtl'; slider.init({ rtl: isRTL }); 5. Handle mixed-direction content carefully
Product titles in Arabic stores often contain English brand names, model numbers or sizes. The Unicode bidirectional algorithm usually copes, but numbers and punctuation at the edges of a string can jump to the wrong side. Wrap user-generated or mixed values with <bdi>:
<span class="product-sku"><bdi>{{ variant.sku }}</bdi></span> Prices deserve extra testing. Check how the currency code or symbol renders next to Arabic text, and make sure phone numbers in the footer stay readable in both directions.
6. Choose fonts that support Arabic properly
Many popular Latin web fonts have no Arabic glyphs, so the browser falls back to a system font and the store suddenly looks inconsistent. Pick a pairing with a proper Arabic companion, set it with a locale-based class, and increase the line height slightly. Arabic script generally needs more vertical space to stay readable.
[lang="ar"] body { font-family: 'Noto Kufi Arabic', system-ui, sans-serif; line-height: 1.8; } 7. Test the whole purchase path, not just the homepage
The homepage is usually fine after the steps above. Problems hide in the cart drawer, quantity selectors, filters, account pages and the order confirmation email. Walk through a complete order in Arabic on mobile before calling the job done.
Closing thoughts
RTL support is much easier when it is planned from the first line of CSS rather than patched at the end. Set the direction at the root, use logical properties, be deliberate about icons and sliders, and test real purchase flows. If you would rather hand the work to a team that does this regularly, a specialist Shopify Development Dubai studio can build bilingual themes from the ground up, and the same principles apply to any custom Web Design Dubai project that has to serve both Arabic and English audiences.
