Make WordPress Core

Changeset 29260


Ignore:
Timestamp:
07/21/2014 09:50:12 PM (10 years ago)
Author:
johnbillion
Message:

Add a lang attribute to each language listed on the language selector screen during installation. See #28858, #28577.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r29206 r29260  
    21982198    echo "<legend class='screen-reader-text'>Select a default language</legend>\n";
    21992199    echo '<input type="radio" checked="checked" class="screen-reader-input language-chooser-input" name="language" id="language_default" value="">';
    2200     echo '<label for="language_default">English (United States)</label>';
     2200    echo '<label for="language_default" lang="en">English (United States)</label>';
    22012201    echo "\n";
    22022202
     
    22052205            $language = $languages[ WPLANG ];
    22062206            echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_wplang" value="' . esc_attr( $language['language'] ) . '">';
    2207             echo '<label for="language_wplang">' . esc_html( $language['native_name'] ) . "</label>\n";
     2207            echo '<label for="language_wplang" lang="' . esc_attr( $language['iso'][1] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n";
    22082208        }
    22092209    }
     
    22112211    foreach ( $languages as $language ) {
    22122212        echo '<input type="radio" name="language" class="' . esc_attr( $language['language'] ) . ' screen-reader-input language-chooser-input" id="language_'. esc_attr( $language['language'] ) .'" value="' . esc_attr( $language['language'] ) . '">';
    2213         echo '<label for="language_' . esc_attr( $language['language'] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n";
     2213        echo '<label for="language_' . esc_attr( $language['language'] ) . '" lang="' . esc_attr( $language['iso'][1] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n";
    22142214    }
    22152215    echo "</fieldset>\n";
Note: See TracChangeset for help on using the changeset viewer.