Last week, Scott announced the Sandbox Designs Competition. I’m looking forward to seeing how this competition turns out. A good-looking style on top of the semantic, microformaty goodness of Sandbox might make for a good theme to bundle with WordPress. And I’m sure the Automattic crew will find some favorites from the competition to include on WordPress.com. Consider participating in or sponsoring the competition and help bring some new designs to the WP community while getting some good exposure.
WordPress 2.1 introduces a new template function called language_attributes(). This function can be used to add lang, xml:lang and dir attributes to the html tag of your theme.
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
If your locale is currently set to “en”, the result looks like this:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
If you are using a right-to-left language like Farsi, the output looks like this:
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" lang="fa" xml:lang="fa">
To get the language and direction individually, use get_bloginfo().
$direction = get_bloginfo('text_direction');
$language = get_bloginfo('language');
language_attributes() is in 2.1 only, so adding it to your theme will make it incompatible with 2.0.x unless you take special precautions. Once 2.1 is out, this might be backported to 2.0.x.