Universally Documentation

Step-by-step guides, multilingual SEO tips, and best practices to help you translate and scale your WordPress website.

Right-to-left languages

Nine of the 110 supported languages are written right to left. Universally marks those pages so the browser lays them out correctly, and there is nothing to configure.

The nine

Language Code
Arabic ar
Dhivehi dv
Hebrew he
Pashto ps
Persian fa
Sindhi sd
Urdu ur
Uyghur ug
Yiddish yi

What happens automatically

A translated page in one of these languages is served with its direction set to right to left. Browsers handle the rest: text alignment, the order of inline elements, and where punctuation lands at the end of a line.

Your source-language pages are unaffected.

What your theme has to handle

Direction is set correctly, but a layout hard-coded for left to right will not flip itself. The usual problems, in the order they show up:

Anything positioned with fixed left or right values. Sidebars, floated images, and absolutely positioned badges stay where the CSS puts them. Use CSS logical properties such as margin-inline-start instead of margin-left, and they follow the direction automatically.

Icons that imply direction. A "next" arrow should point left in a right-to-left layout. An arrow set as a background image or an icon font will keep pointing right.

Text alignment forced in CSS. text-align: left overrides the document direction. text-align: start respects it.

Most modern themes handle this, because WordPress has supported RTL locales for years. Older or heavily customised themes are where it breaks.

Checking your layout

Add one of the nine, then open a translated page and look at it. Layout problems in a right-to-left language are visually obvious in a way that missing translations are not, so a single page tells you most of what you need.

If the layout breaks, it is your theme's CSS rather than the translation. See Layout breaks after translation.

Mixed content

Latin text inside right-to-left content, such as a brand name or a URL, stays left to right within the sentence. Browsers do this correctly on their own, and it is what a reader expects.

If a brand name should never be translated in the first place, a glossary rule is the tool. See Glossary rules.

Was this helpful?