Add language and text_direction attributes to bloginfo. Set lang and dir attributes in admin header's html tag. #3136

git-svn-id: http://svn.automattic.com/wordpress/trunk@4217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-09-24 19:29:32 +00:00
parent 37d767a019
commit e307c8a125
2 changed files with 13 additions and 1 deletions

View File

@ -13,7 +13,7 @@ get_admin_page_title();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php bloginfo('text_direction'); ?>" lang="<?php bloginfo('language'); ?>" xml:lang="<?php bloginfo('language'); ?>">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>

View File

@ -127,6 +127,18 @@ function get_bloginfo($show='') {
global $wp_version;
$output = $wp_version;
break;
case 'language':
$output = get_locale();
if ( empty($output) )
$output = 'en-US';
$output = str_replace('_', '-', $output);
break;
case 'text_direction':
global $wp_locale;
$output = $wp_locale->text_direction;
if ( empty($output) )
$output = 'ltr';
break;
case 'name':
default:
$output = get_option('blogname');