Skip to content

Commit 12477fb

Browse files
committed
Remove non-existent git repos
Also sort the language entries in alphabetical order from their ISO code
1 parent eea83e6 commit 12477fb

File tree

1 file changed

+6
-58
lines changed

1 file changed

+6
-58
lines changed

include/languages.inc

Lines changed: 6 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,22 @@
22

33
/*
44
This is a list of all manual languages hosted
5-
within PHP SVN modules (phpdoc-{lang})
6-
7-
Some codes, like "kr", "tw" and "hk" are not in
8-
conformance with the official language code standard!
9-
10-
http://www.unicode.org/unicode/onlinedat/languages.html
5+
within PHP Git repositories (https://github.com/php/doc-{lang})
116
*/
127
$LANGUAGES = [
138
'en' => 'English',
14-
'ar' => 'Arabic',
15-
'bg' => 'Bulgarian',
16-
'pt_BR' => 'Brazilian Portuguese',
17-
'zh' => 'Chinese (Simplified)',
18-
'hk' => 'Chinese (Hong Kong Cantonese)',
19-
'tw' => 'Chinese (Traditional)',
20-
'ca' => 'Catalan',
21-
'cs' => 'Czech',
22-
'da' => 'Danish',
23-
'nl' => 'Dutch',
24-
'fi' => 'Finnish',
25-
'fr' => 'French',
269
'de' => 'German',
27-
'el' => 'Greek',
28-
'he' => 'Hebrew',
29-
'hu' => 'Hungarian',
30-
'id' => 'Indonesian',
10+
'es' => 'Spanish',
11+
'fr' => 'French',
3112
'it' => 'Italian',
3213
'ja' => 'Japanese',
33-
'kr' => 'Korean',
34-
'lt' => 'Lithuanian',
35-
'no' => 'Norwegian',
3614
'pl' => 'Polish',
37-
'pt' => 'Portuguese',
15+
'pt_BR' => 'Brazilian Portuguese',
3816
'ro' => 'Romanian',
3917
'ru' => 'Russian',
40-
'fa' => 'Persian',
41-
'sr' => 'Serbian',
42-
'sk' => 'Slovak',
43-
'sl' => 'Slovenian',
44-
'es' => 'Spanish',
45-
'sv' => 'Swedish',
4618
'tr' => 'Turkish',
4719
'uk' => 'Ukrainian',
20+
'zh' => 'Chinese (Simplified)',
4821
];
4922

5023
/*
@@ -57,46 +30,21 @@ $LANGUAGES = [
5730
- http://docs.php.net/
5831
*/
5932
$INACTIVE_ONLINE_LANGUAGES = [
60-
'ar' => 'Arabic',
61-
'bg' => 'Bulgarian',
62-
'hk' => 'Chinese (Hong Kong Cantonese)',
63-
'tw' => 'Chinese (Traditional)',
64-
'ca' => 'Catalan',
65-
'cs' => 'Czech',
66-
'da' => 'Danish',
67-
'nl' => 'Dutch',
68-
'fi' => 'Finnish',
69-
'el' => 'Greek',
70-
'he' => 'Hebrew',
71-
'hu' => 'Hungarian',
72-
'id' => 'Indonesian',
73-
'kr' => 'Korean',
74-
'lt' => 'Lithuanian',
75-
'no' => 'Norwegian',
7633
'pl' => 'Polish',
77-
'pt' => 'Portuguese',
78-
'fa' => 'Persian',
7934
'ro' => 'Romanian',
80-
'sr' => 'Serbian',
81-
'sk' => 'Slovak',
82-
'sl' => 'Slovenian',
83-
'sv' => 'Swedish',
8435
'uk' => 'Ukrainian',
8536
];
8637

8738
$ACTIVE_ONLINE_LANGUAGES = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES);
8839

8940
// Convert between language codes back and forth
90-
// [We use non standard languages codes and so conversion
41+
// [We use non-standard languages codes and so conversion
9142
// is needed when communicating with the outside world]
9243
function language_convert(string $langcode): string
9344
{
9445
global $LANGUAGES;
9546
switch ($langcode) {
9647
case 'zh_cn': return 'zh';
97-
case 'zh_hk': return 'hk';
98-
case 'zh_tw': return 'tw';
99-
case 'ko' : return 'kr';
10048
default:
10149
// Fallback on english if we got something wacky
10250
return array_key_exists($langcode, $LANGUAGES) ? $langcode : 'en';

0 commit comments

Comments
 (0)