I found your website on a WordPress forum. Currently I am rebuilding a website in wordpress that is in English and Farsi. I am using the Qtranslate and a theme called suffusion which supports RTL. The theme does come a rtl.css which moves everything to the right which is great. The problem I am having is switching from my LTR Style Sheet to RTL stylesheet when the language is switched. If you could be of any assistance on this it would be greatly appreciated.
Thank You – Chris
First let’s assume that your language is xy_XY (replace with your real language like fr_FR, fa_IR, etc…)
The direction for the language is declared on a php file located on the same directory where your languages files reside, actually the folder
/X/wp-content/languages/ (where X is the path to the WP installation).
For each language there should be 3 files:
- xy_XY.mo [required]: compressed language file, all text strings are pulled from this file
- xy_XY.po [not required]: Ignore it unless you want to modify the default WP text strings
- xy_XY.php [not required]: Used for declaring the text direction for the xy_XY language, if not present LTR is assumed
Don’t be surprised if you don’t find the php file xy_XY.php, your description suggests that it’s missing, so create it and add this line of code:
<?php $text_direction = "rtl"; ?>
This should fix your error and the direction will be set to RTL for your RTL language.