views:

24

answers:

2

In wordpress, inside the header.php file of a theme, there is the next line:

<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

By default, it(language_attributes) returns dir=ltr, and every online guide i read tried to show a way to hange the css file.

it's not enough and not semantic. i need to change the html itself to rtl. how can it be done? is there a settings file?

A: 

Take a look at the following two links. You need to ensure both of your theme and WordPress are setup for RTL.

http://codex.wordpress.org/Right_to_Left_Language_Support

http://codex.wordpress.org/Function_Reference/get_bloginfo

Jason McCreary
Doesn't seem to be this easy :) The CSS method is what the OP already has (but doesn't want); `get_bloginfo()` is deprecated in 3.0 in favour of `is_rtl()` which is defined [here](http://core.trac.wordpress.org/browser/trunk/wp-includes/locale.php#L346), but I have no idea where this is changed
Pekka
I provided the second link to show the blog info options that need to be set. The OP didn't mention trying that. I believe the combination of the two should get it done as the WP Codex is reliable, albeit sometimes dated.
Jason McCreary
thanks guys, but it seems that my main problem with WP still stands. get_blohinfo() and other functions are getters, where and how I use the setters?As to the original question, i found the answer by crawling in the files. there is the locale.php file under wp-include, there's a global var named $text_direction, the is_rtl uses it.And, o/c - it's wp3.thanks again
yossi
I would see if this variable is set in the database. Hence the `get_bloginfo()` reference. That way you're not hardcoding it in the core files.
Jason McCreary