Does Weglot support Right To Left (RTL) languages?

In this article, you will find how Weglot supports Right To Left (RTL) language translations.

Weglot supports RTL languages and keeps the same layout and HTML structure as the original version of your website in the translated versions. Here are some of our available RTL languages:

  • Arabic (ar), 
  • Hebrew (he), 
  • Persian (fa) 
  • or Urdu (ur) 

How to customize your RTL language layout?

First of all, be sure that your theme supports the Right to Left direction.

You can add some custom CSS code that can be applied only to your RTL language(s). 
To do so, you'll need to go to your Weglot dashboard > Settings > Language Switcher > then add the code below into the "CUSTOM CSS" field:

Here's the code:

html[lang="ar"] body {
       direction: RTL!important;
       text-align: right!important;
}
html[lang="ar"] .left {
      text-align: right!important;
}

Then click on "Save changes" and refresh your website
Please note that the code above is adapted for the Arabic language, if you need to use the same code for the Hebrew language, you can simply replace the language tag "ar" with "he"

Layout issues that might happen

Sometimes, your pages might not be fully properly displayed in RTL design.

To fix that:
- First, check with your inspector if the CSS rule direction: rtl; applies to the concerned content. If not, please add it to your Weglot Override CSS
- Alternatively, you could also try other CSS rules such as:

  • float: right!important; align-content: right!important; 
  • or align-items: right!important;

Still need help? Contact Us Contact Us