I have been working on setting up locales for left-to-right languages. I wanted to know the support Craft provides for Right-to-Left languages like Arabic, Hebrew etc. Is there a plugin that could help or is it just the way other locales are setup (but with additional step)?

Any insight on this topic is helpful! Thanks!

3 Answers 3


You can use the locale as per below examples in your _layout.twig file.

<body class="{% if craft.locale == 'ar' %}rtl{% endif %}">

Your css would then be:

.rtl {direction:rtl}

And in your <html> like so:

<!DOCTYPE html>
<html dir="{% if craft.locale == 'ar' %}rtl{% endif %} lang="



You should be able to copy the format of a rtl language locale file in craft > app > framework > i18n > data. For instance if you select the Arabic ar.php file around line 268 set your language orientation.

enter image description here


I'm not sure exactly what support you're looking for, but the Craft Control Panel does fully support RTL languages like Arabic and Hebrew.

enter image description here

  • Thanks for your response. I am not talking about the Control Panel in craft. I want to add a new locales language (Hebrew or Arabic) and have it rendered from right to left. All the other languages that I have setup are left to right. When I tries Hebrew, it would render from left to right and not right to left. Is there a setting that I have to change while setting up that locale?
    – user6999
    Commented Aug 19, 2017 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.