Change the languages for WordPress to RTL languages

Many people want to change the languages for WordPress, in my case I’m arabic user so i wanted in one of my project to change the theme to rtl languages .

First you have to edit the wp-config file and write in it 

define ('WPLANG', 'ar');

Create a directory in wp-content called languages , create ar.php file and put the following code in it

$text_direction = 'rtl';

$text-direction variable change the direction of WordPress when you use a function called is_rtl to test that .

Many themes these days support rtl languages, if not you have to edit the styles for the themes to be right to left direction, what you have to change the following :

  • Any float: left change to float:right and vice versa
  • margin-right –> margin-left and vice versa
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: