WordPress.org

Make WordPress Core

Ticket #1081: blog-lang.2.diff

File blog-lang.2.diff, 24.3 KB (added by kim, 9 years ago)
  • wp-rss.php

    Inspired by:  http://www.w3.org/TR/i18n-html-tech-lang/
    
    http://mosquito.wordpress.org/view.php?id=1081
    
    
     
    77    require('wp-blog-header.php'); 
    88} 
    99 
    10 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true); 
     10header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true); 
     11header('Content-Language: ' . get_settings('blog_lang'), true); 
    1112$more = 1; 
    1213 
    1314?> 
     
    2021        <description><?php bloginfo_rss('description') ?></description> 
    2122        <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></lastBuildDate> 
    2223        <docs>http://backend.userland.com/rss092</docs> 
    23         <language><?php echo get_option('rss_language'); ?></language> 
     24        <language><?php echo get_option('blog_language'); ?></language> 
    2425 
    2526<?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 
    2627        <item> 
  • wp-login.php

     
    66 
    77header('Expires: Wed, 11 Jan 1984 05:00:00 GMT'); 
    88header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 
    9 header('Cache-Control: no-cache, must-revalidate'); 
     9header('Cache-Control: no-cache, must-revalidate, max-age=0'); 
    1010header('Pragma: no-cache'); 
    1111 
     12header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
     13header('Content-Language: ' . get_option('blog_lang')); 
     14 
    1215if ( defined('RELOCATE') ) { // Move flag is set 
    1316        if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) ) 
    1417                $_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] ); 
     
    2326 
    2427        wp_clearcookie(); 
    2528        do_action('wp_logout'); 
    26         header('Expires: Mon, 11 Jan 1984 05:00:00 GMT'); 
    27         header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); 
    28         header('Cache-Control: no-cache, must-revalidate, max-age=0'); 
    29         header('Pragma: no-cache'); 
    3029        header('Location: wp-login.php'); 
    3130        exit(); 
    3231 
     
    3635do_action('lost_password'); 
    3736?> 
    3837<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    39 <html xmlns="http://www.w3.org/1999/xhtml"> 
     38<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    4039<head> 
    4140        <title>WordPress &raquo; <?php _e('Lost Password') ?></title> 
    4241        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 
     42        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    4343        <link rel="stylesheet" href="<?php echo get_settings('siteurl'); ?>/wp-admin/wp-admin.css" type="text/css" /> 
    4444        <script type="text/javascript"> 
    4545        function focusit() { 
     
    195195                $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']); 
    196196?> 
    197197<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    198 <html xmlns="http://www.w3.org/1999/xhtml"> 
     198<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    199199<head> 
    200200        <title>WordPress &rsaquo; <?php _e('Login') ?></title> 
    201201        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 
     202        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    202203        <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-admin/wp-admin.css" type="text/css" /> 
    203204        <script type="text/javascript"> 
    204205        function focusit() { 
  • wp-blog-header.php

     
    115115                @header('HTTP/1.x 404 Not Found'); 
    116116 } else if ( empty($feed) ) { 
    117117        @header('X-Pingback: '. get_bloginfo('pingback_url')); 
    118         @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
     118        @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
     119        @header('Content-Language: ' . get_settings('blog_lang'), true); 
    119120} else { 
    120121        // We're showing a feed, so WP is indeed the only thing that last changed 
    121122        if ( $withcomments ) 
  • wp-rdf.php

     
    77    require('wp-blog-header.php'); 
    88} 
    99 
    10 header('Content-type: application/rdf+xml; charset=' . get_settings('blog_charset'), true); 
     10header('Content-Type: application/rdf+xml; charset=' . get_settings('blog_charset'), true); 
     11header('Content-Language: ' . get_settings('blog_lang'), true); 
    1112$more = 1; 
    1213 
    1314?> 
  • wp-content/themes/classic/comments-popup.php

     
    44foreach ($posts as $post) { start_wp(); 
    55?> 
    66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    7 <html xmlns="http://www.w3.org/1999/xhtml"> 
     7<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    88<head> 
    99     <title><?php echo get_settings('blogname'); ?> - <?php echo sprintf(__("Comments on %s"), the_title('','',false)); ?></title> 
    1010 
  • wp-content/themes/classic/header.php

     
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
     2<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    33 
    44<head profile="http://gmpg.org/xfn/11"> 
    55        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 
     6        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    67 
    78        <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> 
    89         
  • wp-content/themes/default/comments-popup.php

     
    44foreach ($posts as $post) { start_wp(); 
    55?> 
    66<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    7 <html xmlns="http://www.w3.org/1999/xhtml"> 
     7<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    88<head> 
    99     <title><?php echo get_settings('blogname'); ?> - Comments on <?php the_title(); ?></title> 
    1010 
    1111        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 
     12        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    1213        <style type="text/css" media="screen"> 
    1314                @import url( <?php bloginfo('stylesheet_url'); ?> ); 
    1415                body { margin: 3px; } 
  • wp-content/themes/default/header.php

     
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
     2<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    33 
    44<head profile="http://gmpg.org/xfn/11"> 
    55        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 
     6        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    67 
    78        <title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?> <?php wp_title(); ?></title> 
    89         
  • wp-register.php

     
    8585 
    8686        ?> 
    8787<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    88 <html xmlns="http://www.w3.org/1999/xhtml"> 
     88<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    8989<head> 
    9090        <title>WordPress &raquo; <?php _e('Registration Complete') ?></title> 
    9191        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />        
     92        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    9293        <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> 
    9394        <style type="text/css"> 
    9495        .submit { 
     
    115116 
    116117        ?> 
    117118<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    118 <html xmlns="http://www.w3.org/1999/xhtml"> 
     119<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    119120<head> 
    120121        <title>WordPress &raquo; <?php _e('Registration Currently Disabled') ?></title> 
    121122        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>"> 
     123        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    122124        <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css"> 
    123125</head> 
    124126 
     
    141143 
    142144?> 
    143145<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    144 <html xmlns="http://www.w3.org/1999/xhtml"> 
     146<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    145147<head> 
    146148        <title>WordPress &raquo; <?php _e('Registration Form') ?></title> 
    147149        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 
     150        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    148151        <link rel="stylesheet" href="wp-admin/wp-admin.css" type="text/css" /> 
    149152        <style type="text/css"> 
    150153        #user_email, #user_login, #submit { 
  • wp-links-opml.php

     
    22$doing_rss = 1; 
    33 
    44require('wp-blog-header.php'); 
    5 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true); 
     5header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true); 
     6header('Content-Language: ' . get_settings('blog_lang'), true); 
    67$link_cat = $_GET['link_cat']; 
    78if ((empty($link_cat)) || ($link_cat == 'all') || ($link_cat == '0')) { 
    89    $sql_cat = ''; 
  • readme.html

     
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml"> 
     2<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
    33<head> 
    44<title>WordPress &rsaquo; ReadMe</title> 
    55<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     6<meta http-equiv="Content-Language" content="en" /> 
    67<style type="text/css" media="screen"> 
    78        <!-- 
    89        html { 
  • wp-rss2.php

     
    77        require('wp-blog-header.php'); 
    88} 
    99 
    10 header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true); 
     10header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true); 
     11header('Content-Language: ' . get_settings('blog_lang'), true); 
    1112$more = 1; 
    1213 
    1314?> 
     
    2627        <description><?php bloginfo_rss("description") ?></description> 
    2728        <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT'), false); ?></pubDate> 
    2829        <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator> 
    29         <language><?php echo get_option('rss_language'); ?></language> 
     30        <language><?php echo get_option('blog_lang'); ?></language> 
    3031 
    3132        <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_wp(); ?> 
    3233        <item> 
  • wp-commentsrss2.php

     
    66        require('wp-blog-header.php'); 
    77} 
    88 
    9 header('Content-type: text/xml;charset=' . get_settings('blog_charset'), true); 
     9header('Content-Type: text/xml; charset=' . get_settings('blog_charset'), true); 
     10header('Content-Language: ' . get_settings('blog_lang'), true); 
    1011 
    1112echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>';  
    1213?> 
     
    2627        <description><?php bloginfo_rss("description") ?></description> 
    2728        <pubDate><?php echo gmdate('r'); ?></pubDate> 
    2829        <generator>http://wordpress.org/?v=<?php echo $wp_version ?></generator> 
     30        <language><?php echo get_option('blog_lang'); ?></language> 
    2931 
    3032<?php  
    3133                if (is_single() || is_page()) { 
  • wp-atom.php

     
    77    require('wp-blog-header.php'); 
    88} 
    99 
    10 header('Content-type: application/atom+xml; charset=' . get_settings('blog_charset'), true); 
     10header('Content-Type: application/atom+xml; charset=' . get_settings('blog_charset'), true); 
     11header('Content-Language: ' . get_settings('blog_lang'), true); 
    1112$more = 1; 
    1213 
    1314?> 
     
    1516<feed version="0.3" 
    1617  xmlns="http://purl.org/atom/ns#" 
    1718  xmlns:dc="http://purl.org/dc/elements/1.1/" 
    18   xml:lang="<?php echo get_option('rss_language'); ?>" 
     19  xml:lang="<?php echo get_option('blog_lang'); ?>" 
    1920  > 
    2021        <title><?php bloginfo_rss('name') ?></title> 
    2122        <link rel="alternate" type="text/html" href="<?php bloginfo_rss('home') ?>" /> 
  • wp-admin/update-links.php

     
    1717$http_request  = "POST /updated-batch/ HTTP/1.0\r\n"; 
    1818$http_request .= "Host: api.pingomatic.com\r\n"; 
    1919$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.get_settings('blog_charset')."\r\n"; 
     20$http_request .= 'Content-Language: ' . get_settings('blog_lang') . "\r\n"; 
    2021$http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n"; 
    2122$http_request .= 'User-Agent: WordPress/' . $wp_version . "\r\n"; 
    2223$http_request .= "\r\n"; 
  • wp-admin/admin-header.php

     
    11<?php  
    2 @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
     2@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); 
     3@header('Content-Language: ' . get_option('blog_lang')); 
    34if (!isset($_GET["page"])) require_once('admin.php'); ?> 
    45<?php get_admin_page_title(); ?> 
    56<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    6 <html xmlns="http://www.w3.org/1999/xhtml"> 
     7<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    78<head> 
    89<title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title> 
    910<link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 
    1011<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 
     12<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    1113 
    1214<script type="text/javascript"> 
    1315//<![CDATA[ 
  • wp-admin/options-reading.php

     
    1111<h2><?php _e('Reading Options') ?></h2>  
    1212<form name="form1" method="post" action="options.php">  
    1313        <input type="hidden" name="action" value="update" />  
    14         <input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','gzipcompression' " />  
     14        <input type="hidden" name="page_options" value="'posts_per_page','what_to_show','posts_per_rss','rss_use_excerpt','blog_charset','blog_lang','gzipcompression' " />  
    1515        <fieldset class="options">  
    1616        <legend><?php _e('Blog Pages') ?></legend>  
    1717        <table width="100%" cellspacing="2" cellpadding="5" class="editform">  
     
    5050                <td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br /> 
    5151                <?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>  
    5252                </tr> 
     53                <tr valign="top">  
     54                <th width="33%" scope="row"><?php _e('Primary language for pages and feeds:') ?></th> 
     55                <td><input name="blog_lang" type="text" id="blog_lang" value="<?php form_option('blog_lang'); ?>" size="20" class="code" /><br /> 
     56                <?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> 
     57                </tr> 
    5358        </table>  
    5459        <p> 
    5560                <label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_settings('gzipcompression')); ?> />  
  • wp-admin/sidebar.php

     
    1111if ('b' == $_GET['a']) { 
    1212 
    1313?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    14 <html xmlns="http://www.w3.org/1999/xhtml"> 
     14<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
    1515<head> 
    1616<title>WordPress &#8250; Posted</title> 
    1717<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" /> 
     
    2626} else { 
    2727 
    2828?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    29 <html xmlns="http://www.w3.org/1999/xhtml"> 
     29<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    3030<head> 
    3131<title>WordPress &#8250; Sidebar</title> 
    3232<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" /> 
     33<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    3334<link rel="stylesheet" href="wp-admin.css" type="text/css" /> 
    3435<style type="text/css" media="screen"> 
    3536form { 
  • wp-admin/bookmarklet.php

     
    88if ('b' == $a) { 
    99 
    1010?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    11 <html xmlns="http://www.w3.org/1999/xhtml"> 
     11<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> 
    1212<head> 
    1313<script type="text/javascript"> 
    1414<!-- 
     
    4949    /* /big funky fixes */ 
    5050 
    5151?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    52 <html xmlns="http://www.w3.org/1999/xhtml"> 
     52<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    5353<head> 
    5454<title><?php bloginfo('name') ?> &rsaquo; Bookmarklet &#8212; WordPress</title> 
    5555<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 
     56<meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    5657<link rel="stylesheet" href="wp-admin.css" type="text/css" /> 
    5758 
    5859<style type="text/css"> 
  • wp-admin/upgrade-schema.php

     
    213213        add_option('blacklist_keys'); 
    214214        add_option('comment_registration', 0); 
    215215        add_option('open_proxy_check', 1); 
    216         add_option('rss_language', 'en'); 
    217216        add_option('html_type', 'text/html'); 
     217        // 1.5.1 
     218        if (WPLANG == '') { 
     219            add_option('blog_lang', 'en'); 
     220        } else { 
     221            add_option('blog_lang', substr(WPLANG, 0, 2)); 
     222        } 
    218223 
    219224        // Delete unused options 
    220         $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'); 
     225        $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'); 
    221226        foreach ($unusedoptions as $option) : 
    222227                delete_option($option); 
    223228        endforeach; 
  • wp.php

     
    44?> 
    55<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    66"http://www.w3.org/TR/xhtml/DTD/xhtml-transitional.dtd"> 
    7 <html xmlns="http://www.w3.org/1999/xhtml"> 
     7<html lang="<?php get_settings('blog_lang'); ?>" xml:lang="<?php get_settings('blog_lang'); ?>" xmlns="http://www.w3.org/1999/xhtml"> 
    88<head> 
    99        <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> 
    1010        <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" /> 
     11        <meta http-equiv="Content-Language" content="<?php echo get_settings('blog_lang'); ?>" /> 
    1112        <meta name="generator" content="WordPress <?php $wp_version ?>" /> <!-- leave this for stats --> 
    1213        <link rel="alternate" type="text/xml" title="RSS" href="<?php bloginfo('rss2_url'); ?>" /> 
    1314        <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />