If your site is supporting both English / Arabic and or Hebrew using internationalization.
One quick way to add rtl tag in the header for the correct subdirectory is by adding the following php to the html tag in your header.php file.
<?php $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; if (false !== strpos($url,'**/ar**')) { echo 'dir="rtl"';}?>
In this case I have placed Arabic language under the directory called "ar".
if you wish to target Hebrew, then simply change the "/ar" to /"whatever your sub is called".
Loading Conversation