diff --git a/lib/general.lib.php b/lib/general.lib.php index a28101ef65..cb08a39553 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -163,9 +163,6 @@ function get_languages() $results = array(); - /* Prepend English */ - $results['en_US'] = 'English (US)'; - while (false !== ($file = readdir($handle))) { $full_file = AmpConfig::get('prefix') . '/locale/' . $file; @@ -175,46 +172,46 @@ function get_languages() switch ($file) { case 'af_ZA'; $name = 'Afrikaans'; break; /* Afrikaans */ + case 'bg_BG'; $name = 'Български'; break; /* Bulgarian */ case 'ca_ES'; $name = 'Català'; break; /* Catalan */ case 'cs_CZ'; $name = 'Česky'; break; /* Czech */ case 'da_DK'; $name = 'Dansk'; break; /* Danish */ case 'de_DE'; $name = 'Deutsch'; break; /* German */ - case 'en_US'; $name = 'English (US)'; break; /* English */ + case 'el_GR'; $name = 'Greek'; break; /* Greek */ case 'en_GB'; $name = 'English (UK)'; break; /* English */ + case 'en_US'; $name = 'English (US)'; break; /* English */ + case 'es_AR'; $name = 'Español (AR)'; break; /* Spanish */ case 'es_ES'; $name = 'Español'; break; /* Spanish */ case 'es_MX'; $name = 'Español (MX)'; break; /* Spanish */ - case 'es_AR'; $name = 'Español (AR)'; break; /* Spanish */ case 'et_EE'; $name = 'Eesti'; break; /* Estonian */ case 'eu_ES'; $name = 'Euskara'; break; /* Basque */ + case 'fi_FI'; $name = 'Suomi'; break; /* Finnish */ case 'fr_FR'; $name = 'Français'; break; /* French */ case 'ga_IE'; $name = 'Gaeilge'; break; /* Irish */ - case 'el_GR'; $name = 'Greek'; break; /* Greek */ + case 'hu_HU'; $name = 'Magyar'; break; /* Hungarian */ case 'is_IS'; $name = 'Icelandic'; break; /* Icelandic */ case 'it_IT'; $name = 'Italiano'; break; /* Italian */ - case 'lv_LV'; $name = 'Latviešu'; break; /* Latvian */ + case 'ja_JP'; $name = '日本語'; break; /* Japanese */ + case 'ko_KR'; $name = '한국말'; break; /* Korean */ case 'lt_LT'; $name = 'Lietuvių'; break; /* Lithuanian */ - case 'hu_HU'; $name = 'Magyar'; break; /* Hungarian */ + case 'lv_LV'; $name = 'Latviešu'; break; /* Latvian */ + case 'nb_NO'; $name = 'Norsk'; break; /* Norwegian */ case 'nl_NL'; $name = 'Nederlands'; break; /* Dutch */ case 'no_NO'; $name = 'Norsk bokmål'; break; /* Norwegian */ case 'pl_PL'; $name = 'Polski'; break; /* Polish */ case 'pt_BR'; $name = 'Português Brasileiro'; break; /* Portuguese */ case 'pt_PT'; $name = 'Português'; break; /* Portuguese */ case 'ro_RO'; $name = 'Română'; break; /* Romanian */ + case 'ru_RU'; $name = 'Русский'; break; /* Russian */ case 'sk_SK'; $name = 'Slovenčina'; break; /* Slovak */ case 'sl_SI'; $name = 'Slovenščina'; break; /* Slovenian */ case 'sr_CS'; $name = 'Srpski'; break; /* Serbian */ - case 'fi_FI'; $name = 'Suomi'; break; /* Finnish */ case 'sv_SE'; $name = 'Svenska'; break; /* Swedish */ + case 'tr_TR'; $name = 'Türkçe'; break; /* Turkish */ case 'uk_UA'; $name = 'Українська'; break; /* Ukrainian */ case 'vi_VN'; $name = 'Tiếng Việt'; break; /* Vietnamese */ - case 'tr_TR'; $name = 'Türkçe'; break; /* Turkish */ - case 'bg_BG'; $name = 'Български'; break; /* Bulgarian */ - case 'ru_RU'; $name = 'Русский'; break; /* Russian */ case 'zh_CN'; $name = '简体中文'; break; /* Chinese */ case 'zn_TW'; $name = '繁體中文'; break; /* Chinese */ - case 'ko_KR'; $name = '한국말'; break; /* Korean */ - case 'ja_JP'; $name = '日本語'; break; /* Japanese */ - case 'nb_NO'; $name = 'Norsk'; break; /* Norwegian */ /* These languages are right to left. */ case 'ar_SA'; $name = 'العربية'; break; /* Arabic */ case 'he_IL'; $name = 'עברית'; break; /* Hebrew */ @@ -228,6 +225,12 @@ function get_languages() } // end while + // Sort the list of languages by country code + ksort($results); + + // Prepend English (US) + $results = array( "en_US" => "English (US)" ) + $results; + return $results; } // get_languages