Author: Gina Peter Banyard (Girgias) Date: 2024-02-07T18:23:50Z Commit: https://github.com/php/web-php/commit/12477fbcc488cb3077c34f0c1d3b0591b67b7ef6 Raw diff: https://github.com/php/web-php/commit/12477fbcc488cb3077c34f0c1d3b0591b67b7ef6.diff
Remove non-existent git repos Also sort the language entries in alphabetical order from their ISO code Changed paths: M include/languages.inc Diff: diff --git a/include/languages.inc b/include/languages.inc index a40d88cd90..b94f25b5c5 100644 --- a/include/languages.inc +++ b/include/languages.inc @@ -2,49 +2,22 @@ /* This is a list of all manual languages hosted - within PHP SVN modules (phpdoc-{lang}) - - Some codes, like "kr", "tw" and "hk" are not in - conformance with the official language code standard! - - http://www.unicode.org/unicode/onlinedat/languages.html + within PHP Git repositories (https://github.com/php/doc-{lang}) */ $LANGUAGES = [ 'en' => 'English', - 'ar' => 'Arabic', - 'bg' => 'Bulgarian', - 'pt_BR' => 'Brazilian Portuguese', - 'zh' => 'Chinese (Simplified)', - 'hk' => 'Chinese (Hong Kong Cantonese)', - 'tw' => 'Chinese (Traditional)', - 'ca' => 'Catalan', - 'cs' => 'Czech', - 'da' => 'Danish', - 'nl' => 'Dutch', - 'fi' => 'Finnish', - 'fr' => 'French', 'de' => 'German', - 'el' => 'Greek', - 'he' => 'Hebrew', - 'hu' => 'Hungarian', - 'id' => 'Indonesian', + 'es' => 'Spanish', + 'fr' => 'French', 'it' => 'Italian', 'ja' => 'Japanese', - 'kr' => 'Korean', - 'lt' => 'Lithuanian', - 'no' => 'Norwegian', 'pl' => 'Polish', - 'pt' => 'Portuguese', + 'pt_BR' => 'Brazilian Portuguese', 'ro' => 'Romanian', 'ru' => 'Russian', - 'fa' => 'Persian', - 'sr' => 'Serbian', - 'sk' => 'Slovak', - 'sl' => 'Slovenian', - 'es' => 'Spanish', - 'sv' => 'Swedish', 'tr' => 'Turkish', 'uk' => 'Ukrainian', + 'zh' => 'Chinese (Simplified)', ]; /* @@ -57,46 +30,21 @@ $LANGUAGES = [ - http://docs.php.net/ */ $INACTIVE_ONLINE_LANGUAGES = [ - 'ar' => 'Arabic', - 'bg' => 'Bulgarian', - 'hk' => 'Chinese (Hong Kong Cantonese)', - 'tw' => 'Chinese (Traditional)', - 'ca' => 'Catalan', - 'cs' => 'Czech', - 'da' => 'Danish', - 'nl' => 'Dutch', - 'fi' => 'Finnish', - 'el' => 'Greek', - 'he' => 'Hebrew', - 'hu' => 'Hungarian', - 'id' => 'Indonesian', - 'kr' => 'Korean', - 'lt' => 'Lithuanian', - 'no' => 'Norwegian', 'pl' => 'Polish', - 'pt' => 'Portuguese', - 'fa' => 'Persian', 'ro' => 'Romanian', - 'sr' => 'Serbian', - 'sk' => 'Slovak', - 'sl' => 'Slovenian', - 'sv' => 'Swedish', 'uk' => 'Ukrainian', ]; $ACTIVE_ONLINE_LANGUAGES = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES); // Convert between language codes back and forth -// [We use non standard languages codes and so conversion +// [We use non-standard languages codes and so conversion // is needed when communicating with the outside world] function language_convert(string $langcode): string { global $LANGUAGES; switch ($langcode) { case 'zh_cn': return 'zh'; - case 'zh_hk': return 'hk'; - case 'zh_tw': return 'tw'; - case 'ko' : return 'kr'; default: // Fallback on english if we got something wacky return array_key_exists($langcode, $LANGUAGES) ? $langcode : 'en'; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php