diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-22 17:29:46 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-22 17:29:46 +0000 |
commit | 7aa77bc788c0ab60b9bb59de5f6b9dca3722c9cc (patch) | |
tree | fb7d04836e8be88453cca79f0b9756962e840256 /wp-admin/wpmu-options.php | |
parent | aaa125d6fc966800051e249ccb8c6cd43ba9f093 (diff) | |
download | wordpress-mu-7aa77bc788c0ab60b9bb59de5f6b9dca3722c9cc.tar.gz wordpress-mu-7aa77bc788c0ab60b9bb59de5f6b9dca3722c9cc.tar.xz wordpress-mu-7aa77bc788c0ab60b9bb59de5f6b9dca3722c9cc.zip |
Improved language support, props momo360modena, fixes #464
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1121 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/wpmu-options.php')
-rw-r--r-- | wp-admin/wpmu-options.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/wp-admin/wpmu-options.php b/wp-admin/wpmu-options.php index 746fec5..ab63754 100644 --- a/wp-admin/wpmu-options.php +++ b/wp-admin/wpmu-options.php @@ -163,8 +163,8 @@ if (isset($_GET['updated'])) { <legend><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></legend> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <?php - $lang_files = glob( ABSPATH . LANGDIR . "/*.mo" ); - $lang = get_site_option( "WPLANG" ); + $lang_files = glob( ABSPATH . LANGDIR . '/*.mo' ); + $lang = get_site_option('WPLANG'); if( is_array( $lang_files ) ) { ?> <tr valign="top"> @@ -172,12 +172,10 @@ if (isset($_GET['updated'])) { <td> <select name="WPLANG" id="WPLANG"> <?php - echo "<option value=''>".__('Default')."</option>"; + echo '<option value=""'.((empty($lang)) ? ' selected="selected"' : '').'>'.__('English')."</option>"; foreach ( (array) $lang_files as $key => $val ) { - $l = basename( $val, ".mo" ); - echo "<option value='$l'"; - echo $lang == $l ? " selected='selected'" : ""; - echo "> $l</option>"; + $code_lang = basename( $val, '.mo' ); + echo '<option value="'.$code_lang.'"'.(($lang == $code_lang) ? ' selected="selected"' : '').'> '.format_code_lang($code_lang).'</option>'; } ?> </select> @@ -198,7 +196,7 @@ if (isset($_GET['updated'])) { </tr> <?php $menu_perms = get_site_option( "menu_items" ); - $menu_items = array( "plugins" ); + $menu_items = array('plugins'); foreach ( (array) $menu_items as $key => $val ) { $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>"; |