Inspired by:  http://www.w3.org/TR/i18n-html-tech-lang/


Index: wp-rss.php
===================================================================
--- wp-rss.php	(revision 2432)
+++ wp-rss.php	(working copy)
@@ -7,7 +7,8 @@
     require('wp-blog-header.php');
 }
 
-header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 $more = 1;
 
 ?>
@@ -20,7 +21,7 @@
 	<description><?php bloginfo_rss('description') ?></description>
 	<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate>
 	<docs>http://backend.userland.com/rss092</docs>
-	<language><?php echo get_option('rss_language'); ?></language>
+	<language><?php echo get_option('blog_language'); ?></language>
 
 <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
 	<item>
Index: wp-login.php
===================================================================
--- wp-login.php	(revision 2432)
+++ wp-login.php	(working copy)
@@ -6,9 +6,12 @@
 
 header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
 header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-header('Cache-Control: no-cache, must-revalidate');
+header('Cache-Control: no-cache, must-revalidate, max-age=0');
 header('Pragma: no-cache');
 
+header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+header('Content-Language: ' . get_option('blog_lang'));
+
 if ( defined('RELOCATE') ) { // Move flag is set
 	if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
 		$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
@@ -23,10 +26,6 @@
 
 	wp_clearcookie();
 	do_action('wp_logout');
-	header('Expires: Mon, 11 Jan 1984 05:00:00 GMT');
-	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
-	header('Cache-Control: no-cache, must-revalidate, max-age=0');
-	header('Pragma: no-cache');
 	header('Location: wp-login.php');
 	exit();
 
@@ -36,10 +35,11 @@
 do_action('lost_password');
 ?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>WordPress &raquo; <?php _e('Lost Password') ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
 	<script type="text/javascript">
 	function focusit() {
@@ -195,10 +195,11 @@
 		$redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']);
 ?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>WordPress &rsaquo; <?php _e('Login') ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css" type="text/css" />
 	<script type="text/javascript">
 	function focusit() {
Index: wp-blog-header.php
===================================================================
--- wp-blog-header.php	(revision 2432)
+++ wp-blog-header.php	(working copy)
@@ -115,7 +115,8 @@
 		@header('HTTP/1.x 404 Not Found');
  } else if ( empty($feed) ) {
 	@header('X-Pingback: '. get_bloginfo('pingback_url'));
-	@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+	@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+	@header('Content-Language: ' . get_settings('blog_lang'), true);
 } else {
 	// We're showing a feed, so WP is indeed the only thing that last changed
 	if ( $withcomments )
Index: wp-rdf.php
===================================================================
--- wp-rdf.php	(revision 2432)
+++ wp-rdf.php	(working copy)
@@ -7,7 +7,8 @@
     require('wp-blog-header.php');
 }
 
-header('Content-type: application/rdf+xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Type: application/rdf+xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 $more = 1;
 
 ?>
Index: wp-register.php
===================================================================
--- wp-register.php	(revision 2432)
+++ wp-register.php	(working copy)
@@ -85,10 +85,11 @@
 
 	?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>WordPress &raquo; <?php _e('Registration Complete') ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />	
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
 	<style type="text/css">
 	.submit {
@@ -115,10 +116,11 @@
 
 	?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>WordPress &raquo; <?php _e('Registration Currently Disabled') ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>">
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css">
 </head>
 
@@ -141,10 +143,11 @@
 
 ?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>WordPress &raquo; <?php _e('Registration Form') ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" />
 	<style type="text/css">
 	#user_email, #user_login, #submit {
Index: wp-content/themes/classic/comments-popup.php
===================================================================
--- wp-content/themes/classic/comments-popup.php	(revision 2432)
+++ wp-content/themes/classic/comments-popup.php	(working copy)
@@ -4,7 +4,7 @@
 foreach ($posts as $post) { start_wp();
 ?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
      <title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title>
 
Index: wp-content/themes/classic/header.php
===================================================================
--- wp-content/themes/classic/header.php	(revision 2432)
+++ wp-content/themes/classic/header.php	(working copy)
@@ -1,8 +1,9 @@
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 
 <head profile="http://gmpg.org/xfn/11">
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 
 	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
 	
Index: wp-content/themes/default/comments-popup.php
===================================================================
--- wp-content/themes/default/comments-popup.php	(revision 2432)
+++ wp-content/themes/default/comments-popup.php	(working copy)
@@ -4,11 +4,12 @@
 foreach ($posts as $post) { start_wp();
 ?>
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
      <title><?php echo get_settings('blogname'); ?> - Comments on <?php the_title(); ?></title>
 
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<style type="text/css" media="screen">
 		@import url( <?php bloginfo('stylesheet_url'); ?> );
 		body { margin: 3px; }
Index: wp-content/themes/default/header.php
===================================================================
--- wp-content/themes/default/header.php	(revision 2432)
+++ wp-content/themes/default/header.php	(working copy)
@@ -1,8 +1,9 @@
 <!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 
 <head profile="http://gmpg.org/xfn/11">
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 
 	<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title>
 	
Index: wp-links-opml.php
===================================================================
--- wp-links-opml.php	(revision 2432)
+++ wp-links-opml.php	(working copy)
@@ -2,7 +2,8 @@
 $doing_rss = 1;
 
 require('wp-blog-header.php');
-header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 $link_cat = $_GET['link_cat'];
 if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) {
     $sql_cat = '';
Index: readme.html
===================================================================
--- readme.html	(revision 2432)
+++ readme.html	(working copy)
@@ -1,8 +1,9 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>WordPress &rsaquo; ReadMe</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="Content-Language" content="en" />
 <style type="text/css" media="screen">
 	<!--
 	html {
Index: wp-rss2.php
===================================================================
--- wp-rss2.php	(revision 2432)
+++ wp-rss2.php	(working copy)
@@ -7,7 +7,8 @@
 	require('wp-blog-header.php');
 }
 
-header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 $more = 1;
 
 ?>
@@ -26,7 +27,7 @@
 	<description><?php bloginfo_rss("description") ?></description>
 	<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate>
 	<generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator>
-	<language><?php echo get_option('rss_language'); ?></language>
+	<language><?php echo get_option('blog_lang'); ?></language>
 
 	<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?>
 	<item>
Index: wp-commentsrss2.php
===================================================================
--- wp-commentsrss2.php	(revision 2432)
+++ wp-commentsrss2.php	(working copy)
@@ -6,7 +6,8 @@
 	require('wp-blog-header.php');
 }
 
-header('Content-type: text/xml;charset=' . get_settings('blog_charset'), true);
+header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 
 echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; 
 ?>
@@ -26,6 +27,7 @@
 	<description><?php bloginfo_rss("description") ?></description>
 	<pubDate><?php echo gmdate('r'); ?></pubDate>
 	<generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator>
+	<language><?php echo get_option('blog_lang'); ?></language>
 
 <?php 
 		if (is_single() || is_page()) {
Index: wp-atom.php
===================================================================
--- wp-atom.php	(revision 2432)
+++ wp-atom.php	(working copy)
@@ -7,7 +7,8 @@
     require('wp-blog-header.php');
 }
 
-header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Type: application/atom+xml; charset=' . get_settings('blog_charset'), true);
+header('Content-Language: ' . get_settings('blog_lang'), true);
 $more = 1;
 
 ?>
@@ -15,7 +16,7 @@
 <feed version="0.3"
   xmlns="http://purl.org/atom/ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
-  xml:lang="<?php echo get_option('rss_language'); ?>"
+  xml:lang="<?php echo get_option('blog_lang'); ?>"
   >
 	<title><?php bloginfo_rss('name') ?></title>
 	<link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" />
Index: wp-admin/update-links.php
===================================================================
--- wp-admin/update-links.php	(revision 2432)
+++ wp-admin/update-links.php	(working copy)
@@ -17,6 +17,7 @@
 $http_request  = "POST /updated-batch/ HTTP/1.0\r\n";
 $http_request .= "Host: api.pingomatic.com\r\n";
 $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_settings('blog_charset')."\r\n";
+$http_request .= 'Content-Language: ' . get_settings('blog_lang') . "\r\n";
 $http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
 $http_request .= 'User-Agent: WordPress/' . $wp_version . "\r\n";
 $http_request .= "\r\n";
Index: wp-admin/admin-header.php
===================================================================
--- wp-admin/admin-header.php	(revision 2432)
+++ wp-admin/admin-header.php	(working copy)
@@ -1,13 +1,15 @@
 <?php 
-@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+@header('Content-Language: ' . get_option('blog_lang'));
 if (!isset($_GET["page"])) require_once('admin.php'); ?>
 <?php 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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
 <link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
+<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 
 <script type="text/javascript">
 //<![CDATA[
Index: wp-admin/options-reading.php
===================================================================
--- wp-admin/options-reading.php	(revision 2432)
+++ wp-admin/options-reading.php	(working copy)
@@ -11,7 +11,7 @@
 <h2><?php _e('Reading Options') ?></h2> 
 <form name="form1" method="post" action="options.php"> 
 	<input type="hidden" name="action" value="update" /> 
-	<input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','gzipcompression' " /> 
+	<input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','blog_lang','gzipcompression' " /> 
 	<fieldset class="options"> 
 	<legend><?php _e('Blog Pages') ?></legend> 
 	<table width="100%" cellspacing="2" cellpadding="5" class="editform"> 
@@ -50,6 +50,11 @@
 		<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br />
 		<?php _e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td> 
 		</tr>
+		<tr valign="top"> 
+		<th width="33%" scope="row"><?php _e('Primary language for pages and feeds:') ?></th>
+		<td><input name="blog_lang" type="text" id="blog_lang" value="<?php form_option('blog_lang'); ?>" size="20" class="code" /><br />
+		<?php _e('The <a href="http://www.w3.org/TR/i18n-html-tech-lang/#ri20040808.101452727">primary language</a> you write your blog in') ?></td>
+		</tr>
 	</table> 
 	<p>
 		<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> /> 
Index: wp-admin/sidebar.php
===================================================================
--- wp-admin/sidebar.php	(revision 2432)
+++ wp-admin/sidebar.php	(working copy)
@@ -11,7 +11,7 @@
 if ('b' == $_GET['a']) {
 
 ?><!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 lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>WordPress &#8250; Posted</title>
 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
@@ -26,10 +26,11 @@
 } else {
 
 ?><!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>WordPress &#8250; Sidebar</title>
 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
+<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 <link rel="stylesheet" href="wp-admin.css" type="text/css" />
 <style type="text/css" media="screen">
 form {
Index: wp-admin/bookmarklet.php
===================================================================
--- wp-admin/bookmarklet.php	(revision 2432)
+++ wp-admin/bookmarklet.php	(working copy)
@@ -8,7 +8,7 @@
 if ('b' == $a) {
 
 ?><!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 lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <script type="text/javascript">
 <!--
@@ -49,10 +49,11 @@
     /* /big funky fixes */
 
 ?><!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 lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title>
 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
+<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 <link rel="stylesheet" href="wp-admin.css" type="text/css" />
 
 <style type="text/css">
Index: wp-admin/upgrade-schema.php
===================================================================
--- wp-admin/upgrade-schema.php	(revision 2432)
+++ wp-admin/upgrade-schema.php	(working copy)
@@ -213,11 +213,16 @@
 	add_option('blacklist_keys');
 	add_option('comment_registration', 0);
 	add_option('open_proxy_check', 1);
-	add_option('rss_language', 'en');
 	add_option('html_type', 'text/html');
+	// 1.5.1
+	if (WPLANG == '') {
+	    add_option('blog_lang', 'en');
+	} else {
+	    add_option('blog_lang', substr(WPLANG, 0, 2));
+	}
 
 	// Delete unused options
-	$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url');
+	$unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'rss_language');
 	foreach ($unusedoptions as $option) :
 		delete_option($option);
 	endforeach;
Index: wp.php
===================================================================
--- wp.php	(revision 2432)
+++ wp.php	(working copy)
@@ -4,10 +4,11 @@
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?> xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
 	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
+	<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" />
 	<meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats -->
 	<link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" />
 	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

