+ <?php
+ $languages = get_available_languages();
+ $translations = wp_get_available_translations();
+ if ( ! empty( $languages ) || ! empty( $translations ) ) :
+ ?>
+ <tr class="form-field form-required">
+ <th scope="row"><label for="site-language"><?php _e( 'Site Language' ); ?></label></th>
+ <td>
+ <?php
+ // Network default.
+ $lang = get_site_option( 'WPLANG' );
+
+ // Use English if the default isn't available.
+ if ( ! in_array( $lang, $languages ) ) {
+ $lang = '';
+ }
+
+ wp_dropdown_languages( array(
+ 'name' => 'WPLANG',
+ 'id' => 'site-language',
+ 'selected' => $lang,
+ 'languages' => $languages,
+ 'translations' => $translations,
+ 'show_available_translations' => wp_can_install_language_pack(),
+ ) );
+ ?>
+ </td>
+ </tr>
+ <?php endif; // Languages. ?>