- <select name="WPLANG" id="WPLANG">
- <?php mu_dropdown_languages( $languages, get_option('WPLANG') ); ?>
- </select>
+ <?php
+ $locale = get_locale();
+ if ( ! in_array( $locale, $languages ) ) {
+ $locale = '';
+ }
+
+ wp_dropdown_languages( array(
+ 'name' => 'WPLANG',
+ 'id' => 'WPLANG',
+ 'selected' => $locale,
+ 'languages' => $languages,
+ 'translations' => $translations,
+ 'show_available_translations' => ( ! is_multisite() || is_super_admin() ) && wp_can_install_language_pack(),
+ ) );
+
+ // Add note about deprecated WPLANG constant.
+ if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && $locale !== WPLANG ) {
+ if ( is_super_admin() ) {
+ ?>
+ <p class="description">
+ <strong><?php _e( 'Note:' ); ?></strong> <?php printf( __( 'The %s constant in your %s file is no longer needed.' ), '<code>WPLANG</code>', '<code>wp-config.php</code>' ); ?>
+ </p>
+ <?php
+ }
+ _deprecated_argument( 'define()', '4.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
+ }
+ ?>