+
+<?php
+$languages = get_available_languages();
+if ( $languages ) : ?>
+<tr class="user-language-wrap">
+ <th scope="row">
+ <?php /* translators: The user language selection field label */ ?>
+ <label for="locale"><?php _e( 'Language' ); ?></label>
+ </th>
+ <td>
+ <?php
+ $user_locale = $profileuser->locale;
+
+ if ( 'en_US' === $user_locale ) {
+ $user_locale = '';
+ } elseif ( '' === $user_locale || ! in_array( $user_locale, $languages, true ) ) {
+ $user_locale = 'site-default';
+ }
+
+ wp_dropdown_languages( array(
+ 'name' => 'locale',
+ 'id' => 'locale',
+ 'selected' => $user_locale,
+ 'languages' => $languages,
+ 'show_available_translations' => false,
+ 'show_option_site_default' => true
+ ) );
+ ?>
+ </td>
+</tr>
+<?php
+endif;
+?>
+