# RTL and UI localization: what to mirror and what to leave alone

> Right-to-left languages such as Arabic and Hebrew require mirroring part of the interface and keeping the rest. What to flip, what to keep, and how to test it.

*Tags: ux, technique, localization, rtl, interface*

---


> [!info] Quick Definition
> **RTL and UI localization** means adapting an interface to right-to-left languages such as Arabic or Hebrew. It requires mirroring the elements that indicate direction or movement, keeping those that do not carry direction, and checking that text, numbers, and left-to-right content display correctly.


## What does RTL mean?

It stands for *right-to-left*, the reading direction of languages such as Arabic, Hebrew, or Persian. In an RTL interface, the start of a line sits on the right, and the order of elements in a row is also reversed.

A common mistake is to think RTL just means "mirroring" the screen. It does not: text and numbers are not reversed, and many elements must stay the same. The key is distinguishing what has direction from what does not.

## Why does it matter to a designer?

Because an interface mirrored blindly looks wrong. Apple's guidelines warn that flipping a photograph or an illustration often changes its meaning, and that a logo is always shown in its original form. Knowing what to mirror is part of design, not only development.

Apple provides pre-localized symbols and lets teams define the directionality of custom symbols for languages such as Arabic and Hebrew. That confirms the decision is a design one: each symbol either carries a direction or it does not.

## What should be mirrored?

Mozilla, Apple, and Very Good Ventures agree on mirroring what shows direction, movement, progress, or sequence:

| Element | Mirrored? | Source |
|---|---|---|
| Back and forward buttons | Yes: the back button points right | Mozilla, Apple |
| Controls that show progress from one value to another | Yes | Mozilla, Apple |
| Icons that represent text or reading direction | Yes | Apple |
| Elements that show time or sequence | Yes: time moves from right to left | Mozilla |
| Order of images when the order is meaningful | Yes | Apple |

One case has no universal rule. Very Good Ventures says media playback progress indicators stay LTR, because they model a tape being played, while Mozilla and Apple mirror progress controls in general. Define your own rule for the project and apply it consistently.

### What should NOT be mirrored?

- **Text and numbers.** Mozilla does not reverse the order of numbers or units: "1920x1080" does not become "1080x1920", and "10 px" does not become "px 10".
- **Specific numbers.** Apple asks you not to reverse the digits of a specific number, such as 541, a phone number, or a credit card number. Only a sequence that communicates progress or an order is reversed.
- **Clocks and real-world objects.** Apple notes that clocks work the same everywhere, so a clock icon looks the same in either direction.
- **Audio and video player controls**, according to Mozilla.
- **Photographs and illustrations.** Flipping them often changes their meaning.
- **Logos and universal marks**, which are always shown in their original form, even if they include text.
- **Icons with no direction**, such as checkmarks, according to Mozilla.
- **Icons with text**, which are better localized than mirrored.

For a complex custom icon, Apple recommends reviewing its components and its visual balance before simply flipping it.

## How do you implement it without breaking things?

In CSS, Mozilla recommends logical properties instead of `left` and `right`: for example, `margin-inline-start` instead of `margin-left`. That way the margin adapts when the direction changes. If no equivalent exists, use a `:dir(rtl)` rule for that specific case.

For images, Mozilla suggests mirroring them with `transform: scaleX(-1)`, but warns this does not work when the image is a `background-image` on an element that also contains text. In that case, keep an already mirrored asset and load it in the RTL rule.

In Flutter, Very Good Ventures suggests using directional equivalents, such as `EdgeInsetsDirectional`, which keeps padding at the start of the text regardless of its orientation. Many Flutter icons are mirrored by default when the direction flips, and you can fix the direction of a specific one.

In HTML, the W3C asks you to declare the direction with the `dir` attribute on the `html` tag (for example, `dir="rtl"`) and not with CSS. That setting also defines the default paragraph alignment. For mixed-direction text, such as a field where each line may be in a different language, `dir="auto"` decides by the first strongly directional character, although that method is not perfect.

Finally, Apple asks you to align a paragraph by its language, not by the current context, and to keep a consistent alignment across all items in a list.

## How do you test it?

Before translating, test with bidirectional pseudolocalization. In Firefox it is enabled by setting `intl.l10n.pseudo` to `bidi`, and the interface flips immediately. Mozilla warns that this test can show text-ordering oddities that a real RTL build would not have.

Apple proposes test plans in Xcode that help flag clipped or truncated text, overlapping layouts, and RTL formatting problems across the devices and languages you support.

Then test with native speakers. Text can be technically mirrored and still sound odd or be ambiguous.

## When is a full adaptation NOT worth it?

If the product has no plans to reach RTL markets, a full adaptation is not worth the investment. Better to prepare the technical base, with logical properties and separated text, and decide later.

And if an RTL language is secondary and little used in your product, a complete mirror may be less useful than a careful version of the most important screens.

## Example

Illustrative example: a transport app wants to launch its trip screen in Arabic. The team lists every element and decides case by case. It mirrors the order of the steps and the back icon, and the trip progress bar advances from right to left. It leaves the clock icon, the logo, and the vehicle plate unchanged, because they are an object, a brand mark, and a piece of data. The price and the driver's phone number keep their digit order. Before translating, the team turns on bidirectional pseudolocalization and reviews every screen for clipped or overlapping text.

## Common mistakes

- **Mirroring everything** without distinguishing what has direction.
- **Reversing numbers, units, or phone numbers**, which confuses people.
- **Mirroring clocks, photographs, or logos** without considering what they represent.
- **Using fixed properties** (`left`, `right`) instead of logical ones.
- **Testing only in English** and discovering the problems at launch.
- **Leaving the mirroring decision to development** without a design guide.

For the technical base that makes this adaptation possible, [internationalization](/en/wiki/concepts/internationalization/) explains how to prepare the product. And for deciding which markets to prioritize and what to adapt in each, the [product localization strategy](/en/wiki/strategy/localization-strategy/) offers the general framework. If the product must also be readable by people with reading difficulties, [cognitive accessibility](/en/wiki/concepts/cognitive-accessibility/) complements these decisions.

## Sources

- [RTL Guidelines, Firefox Source Docs (Mozilla)](https://firefox-source-docs.mozilla.org/code-quality/coding-style/rtl_guidelines.html)
- [Right to left, Human Interface Guidelines, Apple Developer](https://developer.apple.com/design/human-interface-guidelines/right-to-left)
- [Localization, Apple Developer](https://developer.apple.com/localization/)
- [Text Directionality, Very Good Ventures](https://engineering.verygood.ventures/development/internationalization/text_directionality.md)
- [Declaring the base direction in HTML (dir), W3C Internationalization](https://www.w3.org/International/questions/qa-html-dir)


---

Source: https://www.fernandoux.com/en/wiki/techniques/rtl-and-ui-localization/
