RTL Language Support Website Markup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

RTL Language Support in Website Markup

RTL (Right-to-Left) supports languages written from right to left: Arabic, Hebrew, Persian (Farsi), Urdu. RTL markup is not simply direction: rtl — it's a systemic refactoring of all directional CSS properties and UI components.

Basic RTL Setup

<html dir="rtl" lang="ar">
/* Global reset for RTL */
[dir="rtl"] {
  direction: rtl;
  unicode-bidi: embed;
}

CSS Logical Properties

Instead of physical properties (left, right, margin-left), use logical properties that automatically adapt to dir:

Physical Logical
margin-left margin-inline-start
margin-right margin-inline-end
padding-left padding-inline-start
border-left border-inline-start
left: 0 inset-inline-start: 0
text-align: left text-align: start
float: left float: inline-start

Example: back button with arrow — in LTR the arrow is ←, in RTL the arrow is →. With logical properties this is handled automatically:

.back-arrow {
  margin-inline-end: 8px; /* in LTR: margin-right, in RTL: margin-left */
  /* icon flips via transform or icon direction */
}

Icons and Images

Icons with directional meaning (arrows, back/forward buttons) should be mirrored for RTL:

[dir="rtl"] .directional-icon {
  transform: scaleX(-1);
}

Icons without direction (heart, star, checkmark) should NOT be mirrored. Icons with text (logos) should NOT be mirrored.

Flexbox and Grid in RTL

flex-direction: row in RTL automatically reverses. However, explicit margin-left/margin-right won't change — they must be replaced with logical properties.

/* Incorrect: */
.nav-item + .nav-item { margin-left: 16px; }

/* Correct: */
.nav-item + .nav-item { margin-inline-start: 16px; }

Fonts for RTL Languages

Arabic text requires special fonts: Noto Sans Arabic, Tajawal, Cairo, IBM Plex Sans Arabic. Numbers in Arabic context can display as Eastern Arabic numerals (٠١٢٣٤٥٦٧٨٩) or Western numerals — depends on locale.

Bidirectional Text (BiDi)

A page can contain both directions (Arabic + English). CSS property unicode-bidi: isolate isolates blocks:

.ltr-content {
  direction: ltr;
  unicode-bidi: isolate;
}

For inline elements with opposite direction — use <bdi> tag.

RTL Testing

Quick check tool: Chrome DevTools → Elements → add dir="rtl" to <html>. Or use RTL Toggler extension.

Playwright test:

test('RTL layout', async ({ page }) => {
  await page.goto('/ar');
  await expect(page.locator('html')).toHaveAttribute('dir', 'rtl');
  // Check positioning of key elements
});

Timeline

Adding RTL support to existing LTR site: 2–5 days (depends on physical CSS property usage). Developing with RTL from scratch using logical properties: no additional time with proper practices.