diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index aa44a153d5..a78c7220b7 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -60,6 +60,12 @@ function wp_get_available_translations() { $response = wp_remote_post( $url, $options ); $body = wp_remote_retrieve_body( $response ); if ( $body && $body = json_decode( $body, true ) ) { + $languages = array(); + // Key the language array with the language code + foreach ( $body['languages'] as $language ) { + $languages[$language['language']] = $language; + } + $body['languages'] = $languages; return $body; } return false; @@ -210,11 +216,18 @@ switch($step) { echo ''; echo "\n"; + if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && ( 'en_US' !== WPLANG ) ) { + if ( isset( $body['languages'][WPLANG] ) ) { + $language = $body['languages'][WPLANG]; + echo ''; + echo '\n"; + } + } + foreach ( $body['languages'] as $language ) { echo ''; echo '\n"; } - echo "\n"; echo '

'; echo '';