WordPress and RTL

WordPress is so powerful.. but yet it is so weak with RTL Languages like Arabic and Hebrew…
I need to have the Front-End in Arabic and Admin area to stay in English and of course LTR..
If I use the Arabic version of WordPress. Everything including the admin area will be in Arabic and RTL. which will not be suitable at all.
In the same time. Visually editing an Arabic post should be in RTL while the HTML view should be LTR..

I can see that MU version on wordpress.com can have admin area in English while the frontend is in Arabic.

Read More

How to do that?

Related posts

Leave a Reply

4 comments

  1. WordPress’s back end can handle Arabic just fine, with both the editor and the database itself. If you want the front end to display in Arabic you’ll need to use/develop a theme that uses Arabic.

    If your blog is Arabic-only, you can add a CSS class to the div surrounding the post in the blog template file that sets the text-direction to ltr. If you use Arabic and English, you can set an if statement to decide what direction each post needs to be based on a custom field you add to the post from the back end.

  2. The general steps to add RTL are:

    • Step 1 – Create the RTL CSS for Your Theme.
      The first step is to create the CSS for displaying RTL languages correctly on your website. There are two methods for doing this. The first is to simply feed your existing stylesheet into a CSS RTL generator. This tool will examine your CSS and attempt to make a copy, but switching all the left and right alignments. This effectively creates a mirrored version of your website.
    • Step 2 – Ensure WordPress ‘Sees’ the RTL Styles.
      If you’re using a CSS generator tool, you’ll now need to enqueue your new style-rtl.css stylesheet so WordPress can load it in at the appropriate time. This is just a matter of adding a snippet to your theme’s functions.php file.
    • Step 3: Test Your RTL Styles in WordPress RTL Tester plugin.
      You have a few options for testing out RTL languages in your WordPress installation. The first is to simply switch WordPress to an RTL language. To do this, go to the Settings > General page in your WordPress dashboard. Then, select the first script language you see in the Language drop-down box

    Here is a full guide: https://torquemag.io/2018/03/rtl-support-wordpress/
    For a successfully RTL site example, check out this one.

  3. If you have access to the file system where the site is hosted:

    1. Go to ./wp-content/themes/{THEME_NAME}/.
    2. Find the CSS files of both LTR and RTL (They may be named as “style.css” & “style-rtl.css“, depending on the theme and if it supports RTL).
    3. Rename them by switching their names.

    This way RTL is only applied to the theme.

  4. I had the same issue. The blog is in Arabic, and the admin back-end is in English.

    If you are using Firefox, you can simply overcome this problem by clicking Switch Text Direction from the right-click menu on the TinyMCE.