Use get_available_languages() in options-general.php instead of manually looping on the language dir. Props sivel. Fixes #13023
git-svn-id: http://svn.automattic.com/wordpress/trunk@14416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
856f478a9e
commit
1f18095da6
|
@ -310,27 +310,19 @@ endfor;
|
||||||
</tr>
|
</tr>
|
||||||
<?php do_settings_fields('general', 'default'); ?>
|
<?php do_settings_fields('general', 'default'); ?>
|
||||||
<?php
|
<?php
|
||||||
|
$languages = get_available_languages();
|
||||||
$lang_files = array();
|
if ( is_multisite() && !empty( $languages ) ):
|
||||||
if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) ) {
|
|
||||||
while ( ( $lang_file = readdir( $dh ) ) !== false ) {
|
|
||||||
if ( substr( $lang_file, -3 ) == '.mo' )
|
|
||||||
$lang_files[] = $lang_file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !empty($lang_files) ) {
|
|
||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<th width="33%" scope="row"><?php _e('Site language:') ?></th>
|
<th width="33%" scope="row"><?php _e('Site language:') ?></th>
|
||||||
<td>
|
<td>
|
||||||
<select name="WPLANG" id="WPLANG">
|
<select name="WPLANG" id="WPLANG">
|
||||||
<?php mu_dropdown_languages( $lang_files, get_option('WPLANG') ); ?>
|
<?php mu_dropdown_languages( $languages, get_option('WPLANG') ); ?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} // languages
|
endif;
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue