i18n_data 0.8.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/cache/file_data_provider/countries-AB.txt +249 -0
- data/cache/file_data_provider/countries-AF.txt +141 -141
- data/cache/file_data_provider/countries-AK.txt +249 -0
- data/cache/file_data_provider/countries-AM.txt +166 -166
- data/cache/file_data_provider/countries-AN.txt +249 -0
- data/cache/file_data_provider/countries-AR.txt +133 -133
- data/cache/file_data_provider/countries-AS.txt +132 -132
- data/cache/file_data_provider/countries-AY.txt +249 -0
- data/cache/file_data_provider/countries-AZ.txt +139 -139
- data/cache/file_data_provider/countries-BA.txt +249 -0
- data/cache/file_data_provider/countries-BE.txt +136 -136
- data/cache/file_data_provider/countries-BG.txt +132 -132
- data/cache/file_data_provider/countries-BI.txt +249 -0
- data/cache/file_data_provider/countries-BN.txt +132 -132
- data/cache/file_data_provider/countries-BN_IN.txt +133 -133
- data/cache/file_data_provider/countries-BR.txt +164 -164
- data/cache/file_data_provider/countries-BS.txt +132 -132
- data/cache/file_data_provider/countries-CA.txt +132 -132
- data/cache/file_data_provider/countries-CE.txt +249 -0
- data/cache/file_data_provider/countries-CH.txt +249 -0
- data/cache/file_data_provider/countries-CS.txt +132 -132
- data/cache/file_data_provider/countries-CV.txt +249 -0
- data/cache/file_data_provider/countries-CY.txt +132 -132
- data/cache/file_data_provider/countries-DA.txt +133 -133
- data/cache/file_data_provider/countries-DE.txt +132 -132
- data/cache/file_data_provider/countries-DV.txt +249 -0
- data/cache/file_data_provider/countries-DZ.txt +133 -133
- data/cache/file_data_provider/countries-EE.txt +249 -0
- data/cache/file_data_provider/countries-EL.txt +142 -142
- data/cache/file_data_provider/countries-EN.txt +132 -132
- data/cache/file_data_provider/countries-EO.txt +132 -132
- data/cache/file_data_provider/countries-ES.txt +137 -137
- data/cache/file_data_provider/countries-ET.txt +132 -132
- data/cache/file_data_provider/countries-EU.txt +132 -132
- data/cache/file_data_provider/countries-FA.txt +133 -133
- data/cache/file_data_provider/countries-FF.txt +249 -0
- data/cache/file_data_provider/countries-FI.txt +132 -132
- data/cache/file_data_provider/countries-FO.txt +132 -132
- data/cache/file_data_provider/countries-FR.txt +135 -135
- data/cache/file_data_provider/countries-FY.txt +249 -0
- data/cache/file_data_provider/countries-GA.txt +132 -132
- data/cache/file_data_provider/countries-GL.txt +132 -132
- data/cache/file_data_provider/countries-GN.txt +249 -0
- data/cache/file_data_provider/countries-GU.txt +132 -132
- data/cache/file_data_provider/countries-GV.txt +249 -0
- data/cache/file_data_provider/countries-HA.txt +249 -0
- data/cache/file_data_provider/countries-HE.txt +140 -140
- data/cache/file_data_provider/countries-HI.txt +132 -132
- data/cache/file_data_provider/countries-HR.txt +141 -141
- data/cache/file_data_provider/countries-HT.txt +249 -0
- data/cache/file_data_provider/countries-HU.txt +134 -134
- data/cache/file_data_provider/countries-HY.txt +132 -132
- data/cache/file_data_provider/countries-IA.txt +132 -132
- data/cache/file_data_provider/countries-ID.txt +146 -146
- data/cache/file_data_provider/countries-IO.txt +249 -0
- data/cache/file_data_provider/countries-IS.txt +136 -136
- data/cache/file_data_provider/countries-IT.txt +135 -135
- data/cache/file_data_provider/countries-IU.txt +249 -0
- data/cache/file_data_provider/countries-JA.txt +132 -132
- data/cache/file_data_provider/countries-KA.txt +132 -132
- data/cache/file_data_provider/countries-KI.txt +249 -0
- data/cache/file_data_provider/countries-KK.txt +132 -132
- data/cache/file_data_provider/countries-KL.txt +249 -0
- data/cache/file_data_provider/countries-KM.txt +132 -132
- data/cache/file_data_provider/countries-KN.txt +132 -132
- data/cache/file_data_provider/countries-KO.txt +143 -143
- data/cache/file_data_provider/countries-KU.txt +133 -133
- data/cache/file_data_provider/countries-KV.txt +249 -0
- data/cache/file_data_provider/countries-KW.txt +249 -0
- data/cache/file_data_provider/countries-KY.txt +249 -0
- data/cache/file_data_provider/countries-LO.txt +249 -0
- data/cache/file_data_provider/countries-LT.txt +132 -132
- data/cache/file_data_provider/countries-LV.txt +131 -131
- data/cache/file_data_provider/countries-MI.txt +130 -130
- data/cache/file_data_provider/countries-MK.txt +132 -132
- data/cache/file_data_provider/countries-ML.txt +132 -132
- data/cache/file_data_provider/countries-MN.txt +145 -145
- data/cache/file_data_provider/countries-MR.txt +132 -132
- data/cache/file_data_provider/countries-MS.txt +136 -136
- data/cache/file_data_provider/countries-MT.txt +159 -159
- data/cache/file_data_provider/countries-MY.txt +249 -0
- data/cache/file_data_provider/countries-NA.txt +249 -0
- data/cache/file_data_provider/countries-NB.txt +132 -132
- data/cache/file_data_provider/countries-NE.txt +132 -132
- data/cache/file_data_provider/countries-NL.txt +133 -133
- data/cache/file_data_provider/countries-NN.txt +130 -130
- data/cache/file_data_provider/countries-NV.txt +249 -0
- data/cache/file_data_provider/countries-OC.txt +142 -142
- data/cache/file_data_provider/countries-OR.txt +133 -133
- data/cache/file_data_provider/countries-PA.txt +134 -134
- data/cache/file_data_provider/countries-PI.txt +249 -0
- data/cache/file_data_provider/countries-PL.txt +133 -133
- data/cache/file_data_provider/countries-PS.txt +171 -171
- data/cache/file_data_provider/countries-PT.txt +142 -142
- data/cache/file_data_provider/countries-PT_BR.txt +132 -132
- data/cache/file_data_provider/countries-RO.txt +132 -132
- data/cache/file_data_provider/countries-RU.txt +133 -133
- data/cache/file_data_provider/countries-RW.txt +134 -134
- data/cache/file_data_provider/countries-SC.txt +249 -0
- data/cache/file_data_provider/countries-SD.txt +249 -0
- data/cache/file_data_provider/countries-SI.txt +132 -132
- data/cache/file_data_provider/countries-SK.txt +132 -132
- data/cache/file_data_provider/countries-SL.txt +132 -132
- data/cache/file_data_provider/countries-SO.txt +142 -142
- data/cache/file_data_provider/countries-SQ.txt +201 -201
- data/cache/file_data_provider/countries-SR.txt +132 -132
- data/cache/file_data_provider/countries-SV.txt +131 -131
- data/cache/file_data_provider/countries-SW.txt +133 -133
- data/cache/file_data_provider/countries-TA.txt +133 -133
- data/cache/file_data_provider/countries-TE.txt +132 -132
- data/cache/file_data_provider/countries-TG.txt +249 -0
- data/cache/file_data_provider/countries-TH.txt +132 -132
- data/cache/file_data_provider/countries-TI.txt +141 -141
- data/cache/file_data_provider/countries-TK.txt +140 -140
- data/cache/file_data_provider/countries-TL.txt +133 -133
- data/cache/file_data_provider/countries-TR.txt +138 -138
- data/cache/file_data_provider/countries-TT.txt +132 -132
- data/cache/file_data_provider/countries-UG.txt +132 -132
- data/cache/file_data_provider/countries-UK.txt +138 -138
- data/cache/file_data_provider/countries-UR.txt +249 -0
- data/cache/file_data_provider/countries-UZ.txt +249 -0
- data/cache/file_data_provider/countries-VE.txt +137 -137
- data/cache/file_data_provider/countries-VI.txt +132 -132
- data/cache/file_data_provider/countries-WA.txt +132 -132
- data/cache/file_data_provider/countries-WO.txt +135 -135
- data/cache/file_data_provider/countries-XH.txt +132 -132
- data/cache/file_data_provider/countries-YO.txt +249 -0
- data/cache/file_data_provider/countries-ZH_CN.txt +131 -131
- data/cache/file_data_provider/countries-ZH_HK.txt +138 -138
- data/cache/file_data_provider/countries-ZH_TW.txt +133 -133
- data/cache/file_data_provider/countries-ZU.txt +154 -154
- data/cache/file_data_provider/languages-AF.txt +19 -20
- data/cache/file_data_provider/languages-AM.txt +20 -21
- data/cache/file_data_provider/languages-AR.txt +60 -61
- data/cache/file_data_provider/languages-AS.txt +20 -21
- data/cache/file_data_provider/languages-AZ.txt +20 -21
- data/cache/file_data_provider/languages-BE.txt +181 -182
- data/cache/file_data_provider/languages-BG.txt +18 -19
- data/cache/file_data_provider/languages-BN.txt +19 -20
- data/cache/file_data_provider/languages-BR.txt +19 -20
- data/cache/file_data_provider/languages-BS.txt +19 -20
- data/cache/file_data_provider/languages-CA.txt +33 -34
- data/cache/file_data_provider/languages-CS.txt +19 -20
- data/cache/file_data_provider/languages-CY.txt +21 -22
- data/cache/file_data_provider/languages-DA.txt +21 -22
- data/cache/file_data_provider/languages-DE.txt +23 -24
- data/cache/file_data_provider/languages-EL.txt +39 -40
- data/cache/file_data_provider/languages-EN.txt +20 -21
- data/cache/file_data_provider/languages-EO.txt +18 -19
- data/cache/file_data_provider/languages-ES.txt +35 -36
- data/cache/file_data_provider/languages-ET.txt +183 -184
- data/cache/file_data_provider/languages-EU.txt +39 -40
- data/cache/file_data_provider/languages-FA.txt +20 -21
- data/cache/file_data_provider/languages-FI.txt +18 -19
- data/cache/file_data_provider/languages-FR.txt +35 -37
- data/cache/file_data_provider/languages-GA.txt +18 -19
- data/cache/file_data_provider/languages-GL.txt +18 -19
- data/cache/file_data_provider/languages-GU.txt +20 -21
- data/cache/file_data_provider/languages-HE.txt +51 -52
- data/cache/file_data_provider/languages-HI.txt +19 -20
- data/cache/file_data_provider/languages-HR.txt +136 -137
- data/cache/file_data_provider/languages-HU.txt +24 -25
- data/cache/file_data_provider/languages-ID.txt +30 -31
- data/cache/file_data_provider/languages-IS.txt +38 -39
- data/cache/file_data_provider/languages-IT.txt +19 -20
- data/cache/file_data_provider/languages-JA.txt +18 -19
- data/cache/file_data_provider/languages-KN.txt +18 -19
- data/cache/file_data_provider/languages-KO.txt +21 -22
- data/cache/file_data_provider/languages-LT.txt +18 -19
- data/cache/file_data_provider/languages-LV.txt +18 -19
- data/cache/file_data_provider/languages-MI.txt +19 -20
- data/cache/file_data_provider/languages-MK.txt +19 -20
- data/cache/file_data_provider/languages-ML.txt +19 -20
- data/cache/file_data_provider/languages-MN.txt +18 -19
- data/cache/file_data_provider/languages-MR.txt +19 -20
- data/cache/file_data_provider/languages-MS.txt +22 -23
- data/cache/file_data_provider/languages-MT.txt +19 -20
- data/cache/file_data_provider/languages-NB.txt +21 -22
- data/cache/file_data_provider/languages-NL.txt +29 -30
- data/cache/file_data_provider/languages-NN.txt +18 -19
- data/cache/file_data_provider/languages-OC.txt +57 -58
- data/cache/file_data_provider/languages-OR.txt +19 -20
- data/cache/file_data_provider/languages-PA.txt +21 -22
- data/cache/file_data_provider/languages-PL.txt +23 -24
- data/cache/file_data_provider/languages-PS.txt +19 -20
- data/cache/file_data_provider/languages-PT.txt +42 -43
- data/cache/file_data_provider/languages-PT_BR.txt +37 -38
- data/cache/file_data_provider/languages-RO.txt +18 -19
- data/cache/file_data_provider/languages-RU.txt +21 -22
- data/cache/file_data_provider/languages-RW.txt +18 -19
- data/cache/file_data_provider/languages-SC.txt +184 -0
- data/cache/file_data_provider/languages-SK.txt +21 -22
- data/cache/file_data_provider/languages-SL.txt +18 -19
- data/cache/file_data_provider/languages-SQ.txt +184 -0
- data/cache/file_data_provider/languages-SR.txt +30 -31
- data/cache/file_data_provider/languages-SV.txt +39 -40
- data/cache/file_data_provider/languages-TA.txt +19 -20
- data/cache/file_data_provider/languages-TE.txt +18 -19
- data/cache/file_data_provider/languages-TG.txt +184 -0
- data/cache/file_data_provider/languages-TH.txt +19 -20
- data/cache/file_data_provider/languages-TI.txt +19 -20
- data/cache/file_data_provider/languages-TR.txt +40 -41
- data/cache/file_data_provider/languages-TT.txt +19 -20
- data/cache/file_data_provider/languages-UK.txt +23 -24
- data/cache/file_data_provider/languages-VE.txt +19 -20
- data/cache/file_data_provider/languages-VI.txt +18 -19
- data/cache/file_data_provider/languages-WA.txt +18 -19
- data/cache/file_data_provider/languages-XH.txt +19 -20
- data/cache/file_data_provider/languages-ZH_CN.txt +17 -18
- data/cache/file_data_provider/languages-ZH_HK.txt +36 -37
- data/cache/file_data_provider/languages-ZH_TW.txt +36 -37
- data/cache/file_data_provider/languages-ZU.txt +19 -20
- data/lib/i18n_data/live_data_provider.rb +16 -17
- data/lib/i18n_data/version.rb +1 -1
- data/lib/i18n_data.rb +27 -18
- metadata +42 -5
@@ -1,60 +1,57 @@
|
|
1
1
|
AA;;阿法爾語
|
2
2
|
AB;;亞布卡薩語
|
3
|
-
AF
|
3
|
+
AF;;南非荷蘭文
|
4
4
|
AK;;迦納語
|
5
|
-
SQ;;阿爾巴尼亞語
|
6
5
|
AM;;阿姆哈拉語
|
7
6
|
AR;;阿拉伯語
|
8
7
|
AN;;阿拉貢語
|
9
|
-
HY;;亞美尼亞語
|
10
8
|
AS;;阿薩姆語
|
11
9
|
AV;;阿瓦爾語
|
12
|
-
AE
|
10
|
+
AE;;阿維斯語
|
13
11
|
AY;;亞摩拉語
|
14
12
|
AZ;;亞塞拜然語
|
15
13
|
BA;;巴什喀爾語
|
16
14
|
BM;;班巴拉語
|
17
|
-
|
18
|
-
BE;;白俄語
|
15
|
+
BE;;白俄羅斯語
|
19
16
|
BN;;孟加拉語
|
20
|
-
BH
|
17
|
+
BH;;比哈爾語系
|
21
18
|
BI;;比斯拉馬語
|
19
|
+
BO;;藏語
|
22
20
|
BS;;波士尼亞語
|
23
21
|
BR;;布里敦語
|
24
22
|
BG;;保加利亞語
|
25
|
-
MY;;緬甸語
|
26
23
|
CA;;加泰羅尼亞語
|
24
|
+
CS;;捷克語
|
27
25
|
CH;;查莫羅語
|
28
26
|
CE;;車臣語
|
29
|
-
ZH;;漢語
|
30
27
|
CU;;Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
|
31
28
|
CV;;楚瓦什語
|
32
29
|
KW;;康沃爾語
|
33
30
|
CO;;科西嘉語
|
34
31
|
CR;;克里語
|
35
|
-
|
32
|
+
CY;;威爾斯語
|
36
33
|
DA;;丹麥語
|
34
|
+
DE;;德語
|
37
35
|
DV;;迪維西語
|
38
|
-
NL;;荷蘭語
|
39
36
|
DZ;;宗卡語(不丹)
|
40
|
-
|
37
|
+
EL;;現代希臘語 (1453-)
|
38
|
+
EN;;英文
|
41
39
|
EO;;世界語
|
42
40
|
ET;;愛沙尼亞語
|
41
|
+
EU;;巴斯克語
|
43
42
|
EE;;埃維語
|
44
43
|
FO;;法羅群島語
|
44
|
+
FA;;波斯語
|
45
45
|
FJ;;斐濟語
|
46
46
|
FI;;芬蘭語
|
47
47
|
FR;;法語
|
48
48
|
FY;;西夫里斯蘭語
|
49
49
|
FF;;富拉語
|
50
|
-
KA;;喬治亞語
|
51
|
-
DE;;德語
|
52
50
|
GD;;蓋爾語
|
53
51
|
GA;;愛爾蘭語
|
54
52
|
GL;;加里斯亞語
|
55
53
|
GV;;馬恩語
|
56
|
-
|
57
|
-
GN;;瓜拉尼語(西印度)
|
54
|
+
GN;;巴拉圭瓜拉尼
|
58
55
|
GU;;古吉拉特語
|
59
56
|
HT;;克里奧爾語(海地)
|
60
57
|
HA;;豪撒語(蘇丹)
|
@@ -64,8 +61,8 @@ HI;;印地語(北印度)
|
|
64
61
|
HO;;希里莫圖語
|
65
62
|
HR;;克羅埃西亞語
|
66
63
|
HU;;匈牙利語
|
64
|
+
HY;;亞美尼亞語
|
67
65
|
IG;;伊布語
|
68
|
-
IS;;冰島語
|
69
66
|
IO;;伊多語
|
70
67
|
II;;四川彝語
|
71
68
|
IU;;伊努特語
|
@@ -73,12 +70,14 @@ IE;;國際語
|
|
73
70
|
IA;;拉丁國際語
|
74
71
|
ID;;印尼語
|
75
72
|
IK;;依努庇克語
|
73
|
+
IS;;冰島語
|
76
74
|
IT;;義大利語
|
77
75
|
JV;;爪哇語
|
78
76
|
JA;;日語
|
79
77
|
KL;;格陵蘭語
|
80
|
-
KN;;卡納達語
|
78
|
+
KN;;卡納達語
|
81
79
|
KS;;喀什米爾語
|
80
|
+
KA;;喬治亞語
|
82
81
|
KR;;卡努里語
|
83
82
|
KK;;哈薩克語
|
84
83
|
KM;;中央高棉語
|
@@ -99,43 +98,43 @@ LT;;立陶宛語
|
|
99
98
|
LB;;盧森堡語
|
100
99
|
LU;;盧巴-加丹加語
|
101
100
|
LG;;干達語
|
102
|
-
MK;;馬其頓語
|
103
101
|
MH;;馬紹爾語
|
104
102
|
ML;;馬來亞拉姆語
|
105
|
-
|
106
|
-
|
107
|
-
MS;;馬來語
|
103
|
+
MR;;馬拉提語
|
104
|
+
MK;;馬其頓語
|
108
105
|
MG;;馬達加斯加語
|
109
106
|
MT;;馬爾他語
|
110
|
-
MO;;摩爾達維亞語
|
111
107
|
MN;;蒙古語
|
112
|
-
|
108
|
+
MI;;毛利語
|
109
|
+
MS;;馬來語
|
110
|
+
MY;;緬甸語
|
111
|
+
NA;;諾魯
|
113
112
|
NV;;納瓦霍語
|
114
113
|
NR;;南恩德貝勒語
|
115
114
|
ND;;北恩德貝勒語
|
116
115
|
NG;;恩敦加語
|
117
116
|
NE;;尼泊爾語
|
117
|
+
NL;;荷蘭語
|
118
118
|
NN;;新挪威語
|
119
119
|
NB;;書面挪威語
|
120
120
|
NO;;挪威語
|
121
121
|
NY;;契切瓦語
|
122
|
-
OC;;奧克西坦語 (1500 之後)
|
122
|
+
OC;;奧克西坦語 (1500 之後);普羅旺斯語
|
123
123
|
OJ;;奧杰布瓦語
|
124
|
-
OR;;歐利亞語
|
124
|
+
OR;;歐利亞語
|
125
125
|
OM;;奧洛莫語
|
126
126
|
OS;;奧塞提語
|
127
127
|
PA;;旁遮普語
|
128
|
-
FA;;波斯語
|
129
128
|
PI;;巴利語
|
130
129
|
PL;;波蘭語
|
131
130
|
PT;;葡萄牙語
|
132
131
|
PS;;普什圖語
|
133
|
-
QU
|
132
|
+
QU;;克丘亞語
|
134
133
|
RM;;里托羅曼語
|
135
|
-
RO
|
134
|
+
RO;;羅馬尼亞語;莫爾達維亞語;摩爾多瓦語
|
136
135
|
RN;;克倫地語
|
137
|
-
RU
|
138
|
-
SG;;桑戈語
|
136
|
+
RU;;俄羅斯語
|
137
|
+
SG;;桑戈語
|
139
138
|
SA;;梵語
|
140
139
|
SI;;僧加羅語(錫蘭)
|
141
140
|
SK;;斯洛伐克語
|
@@ -143,14 +142,15 @@ SL;;斯洛維尼亞語
|
|
143
142
|
SE;;北薩米語
|
144
143
|
SM;;薩摩亞語
|
145
144
|
SN;;紹納語
|
146
|
-
SD;;信德語
|
145
|
+
SD;;信德語
|
147
146
|
SO;;索馬利語
|
148
147
|
ST;;南索托語
|
149
148
|
ES;;西班牙語
|
149
|
+
SQ;;阿爾巴尼亞語
|
150
150
|
SC;;薩丁尼亞語
|
151
151
|
SR;;塞爾維亞語
|
152
152
|
SS;;斯瓦齊語
|
153
|
-
SU
|
153
|
+
SU;;巽丹語
|
154
154
|
SW;;史瓦西里語
|
155
155
|
SV;;瑞典語
|
156
156
|
TY;;大溪地語
|
@@ -160,14 +160,13 @@ TE;;特拉古語
|
|
160
160
|
TG;;塔吉克語
|
161
161
|
TL;;塔加拉語
|
162
162
|
TH;;泰語
|
163
|
-
BO;;藏語
|
164
163
|
TI;;提格利尼亞語
|
165
164
|
TO;;東加語(東加群島)
|
166
165
|
TN;;茨瓦納語
|
167
166
|
TS;;宋加語
|
168
167
|
TK;;土庫曼語
|
169
168
|
TR;;土耳其語
|
170
|
-
TW;;奇族語
|
169
|
+
TW;;奇族語
|
171
170
|
UG;;維吾爾語
|
172
171
|
UK;;烏克蘭語
|
173
172
|
UR;;烏爾都語
|
@@ -175,11 +174,11 @@ UZ;;烏茲別克語
|
|
175
174
|
VE;;溫達語
|
176
175
|
VI;;越南語
|
177
176
|
VO;;沃拉普克語
|
178
|
-
|
179
|
-
WA;;瓦隆語(比利時)
|
177
|
+
WA;;瓦隆語
|
180
178
|
WO;;渥魯夫語
|
181
179
|
XH;;科薩語
|
182
180
|
YI;;意第緒語
|
183
181
|
YO;;約魯巴語
|
184
182
|
ZA;;壯語
|
183
|
+
ZH;;中文
|
185
184
|
ZU;;祖魯語
|
@@ -2,11 +2,9 @@ AA;;Afar
|
|
2
2
|
AB;;Isi-Azerbaijani
|
3
3
|
AF;;Isibhunu
|
4
4
|
AK;;Isi-Azerbaijani
|
5
|
-
SQ;;Isi-Azerbaijani
|
6
5
|
AM;;isi-Arabhu
|
7
6
|
AR;;isi-Arabhu
|
8
7
|
AN;;Aragonese
|
9
|
-
HY;;Isi-Romayinani
|
10
8
|
AS;;Assamese
|
11
9
|
AV;;isi-Arabhu
|
12
10
|
AE;;Avestan
|
@@ -14,46 +12,45 @@ AY;;Aymara
|
|
14
12
|
AZ;;Isi-Azerbaijani
|
15
13
|
BA;;Bashkir
|
16
14
|
BM;;Bambara
|
17
|
-
EU;;Isi-Basque
|
18
15
|
BE;;Isi-Buligariyana
|
19
16
|
BN;;Bengali
|
20
17
|
BH;;Isi-Koreyani
|
21
18
|
BI;;Bislama
|
19
|
+
BO;;Tibetan
|
22
20
|
BS;;Isi-Romayinani
|
23
21
|
BR;;Isi-Bretoni
|
24
22
|
BG;;Isi-Buligariyana
|
25
|
-
MY;;Burmese
|
26
23
|
CA;;Catalan; Valencian
|
24
|
+
CS;;Isi Czechiya
|
27
25
|
CH;;Chamorro
|
28
26
|
CE;;Isi Czechiya
|
29
|
-
ZH;;Isi-Shayina
|
30
27
|
CU;;Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic
|
31
28
|
CV;;Chuvash
|
32
29
|
KW;;Isi-Irishi
|
33
30
|
CO;;Isi-Bosniyani
|
34
31
|
CR;;isi-Grike
|
35
|
-
|
32
|
+
CY;;Isi Welsh
|
36
33
|
DA;;Isi-Danishi
|
34
|
+
DE;;isi-Jalimani
|
37
35
|
DV;;Divehi; Dhivehi; Maldivian
|
38
|
-
NL;;Dutch; Flemish
|
39
36
|
DZ;;Dzongkha
|
37
|
+
EL;;Greek, Modern (1453-)
|
40
38
|
EN;;Isi-Ngisi (UK)
|
41
39
|
EO;;Isi-Esperanto
|
42
40
|
ET;;Isi-Estoniyani
|
41
|
+
EU;;Isi-Basque
|
43
42
|
EE;;Ewe
|
44
43
|
FO;;Faroese
|
44
|
+
FA;;Isi-Sebhiyani
|
45
45
|
FJ;;Fijian
|
46
46
|
FI;;Isi-Finishi
|
47
47
|
FR;;Isi-Frentshi
|
48
48
|
FY;;Isi-Ukraniyani
|
49
49
|
FF;;Fulah
|
50
|
-
KA;;isi-Jalimani
|
51
|
-
DE;;isi-Jalimani
|
52
50
|
GD;;Gaelic; Scottish Gaelic
|
53
51
|
GA;;Isi-Irishi
|
54
52
|
GL;;Isi-Galashiyani
|
55
53
|
GV;;Manx
|
56
|
-
EL;;Greek, Modern (1453-)
|
57
54
|
GN;;Isi-Buligariyana
|
58
55
|
GU;;Gujarati
|
59
56
|
HT;;Haitian; Haitian Creole
|
@@ -64,8 +61,8 @@ HI;;Hindi
|
|
64
61
|
HO;;Isi-Thekishi
|
65
62
|
HR;;Isi-Croshiyani
|
66
63
|
HU;;Isi-Hangariyani
|
64
|
+
HY;;Isi-Romayinani
|
67
65
|
IG;;Igbo
|
68
|
-
IS;;isi-Icilendikhi
|
69
66
|
IO;;Ido
|
70
67
|
II;;Isi-Lithuwaniya
|
71
68
|
IU;;Inuktitut
|
@@ -73,12 +70,14 @@ IE;;Interlingue; Occidental
|
|
73
70
|
IA;;Interlingua (International Auxiliary Language Association)
|
74
71
|
ID;;Indoneshiya
|
75
72
|
IK;;Inupiaq
|
73
|
+
IS;;isi-Icilendikhi
|
76
74
|
IT;;Isi-Taliyane
|
77
75
|
JV;;Isi-Jaliphani
|
78
76
|
JA;;Isi-Jaliphani
|
79
77
|
KL;;Kalaallisut; Greenlandic
|
80
78
|
KN;;Kannada
|
81
79
|
KS;;Kashmiri
|
80
|
+
KA;;isi-Jalimani
|
82
81
|
KR;;isi-Kedishi
|
83
82
|
KK;;Kazakh
|
84
83
|
KM;;Central Khmer
|
@@ -99,40 +98,40 @@ LT;;Isi-Lithuwaniya
|
|
99
98
|
LB;;Luxembourgish; Letzeburgesch
|
100
99
|
LU;;Luba-Katanga
|
101
100
|
LG;;Ganda
|
102
|
-
MK;;Isi-Makhedoniya
|
103
101
|
MH;;Isi-Malithalise
|
104
102
|
ML;;Malayalam
|
105
|
-
MI;;Isi-Mawori
|
106
103
|
MR;;Isi-Mawori
|
107
|
-
|
104
|
+
MK;;Isi-Makhedoniya
|
108
105
|
MG;;Malagasy
|
109
106
|
MT;;Isi-Malithalise
|
110
|
-
MO;;Isi-Lavithiyani
|
111
107
|
MN;;Isi-Makhedoniya
|
108
|
+
MI;;Isi-Mawori
|
109
|
+
MS;;Malay
|
110
|
+
MY;;Burmese
|
112
111
|
NA;;Nauru
|
113
112
|
NV;;Navajo; Navaho
|
114
113
|
NR;;Ndebele, South; South Ndebele
|
115
114
|
ND;;Ndebele, North; North Ndebele
|
116
115
|
NG;;Isi-Bosniyani
|
117
116
|
NE;;Nepali
|
117
|
+
NL;;Dutch; Flemish
|
118
118
|
NN;;Isi-Nowejiyani (Nynorsk)
|
119
119
|
NB;;Bokmål, Norwegian; Norwegian Bokmål
|
120
120
|
NO;;Isi-Koreyani
|
121
121
|
NY;;Chichewa; Chewa; Nyanja
|
122
|
-
OC;;Occitan (post 1500)
|
122
|
+
OC;;Occitan (post 1500); Provençal
|
123
123
|
OJ;;Ojibwa
|
124
124
|
OR;;Oriya
|
125
125
|
OM;;Oromo
|
126
126
|
OS;;Isi-Rashiyani
|
127
127
|
PA;;Panjabi; Punjabi
|
128
|
-
FA;;Isi-Sebhiyani
|
129
128
|
PI;;Isi-Pholishi
|
130
129
|
PL;;Isi-Pholishi
|
131
130
|
PT;;Isi-Phuthukesi
|
132
131
|
PS;;Pushto; Pashto
|
133
132
|
QU;;Quechua
|
134
133
|
RM;;Isi-Romayinani
|
135
|
-
RO;;Isi-
|
134
|
+
RO;;Isi-Lavithiyani
|
136
135
|
RN;;Rundi
|
137
136
|
RU;;Isi-Rashiyani
|
138
137
|
SG;;Sango
|
@@ -147,6 +146,7 @@ SD;;Sindhi
|
|
147
146
|
SO;;Somali
|
148
147
|
ST;;Sotho, Southern
|
149
148
|
ES;;Spanish; Castilian
|
149
|
+
SQ;;Isi-Azerbaijani
|
150
150
|
SC;;Isi-Makhedoniya
|
151
151
|
SR;;Isi-Sebhiyani
|
152
152
|
SS;;Swati
|
@@ -160,7 +160,6 @@ TE;;Telugu
|
|
160
160
|
TG;;Isi-Thayi
|
161
161
|
TL;;Tagalog
|
162
162
|
TH;;Isi-Thayi
|
163
|
-
BO;;Tibetan
|
164
163
|
TI;;Isi-Thekishi
|
165
164
|
TO;;Tonga (Tonga Islands)
|
166
165
|
TN;;Tswana
|
@@ -175,11 +174,11 @@ UZ;;Uzbek
|
|
175
174
|
VE;;Venda
|
176
175
|
VI;;Isi-Vitheyinamise
|
177
176
|
VO;;Volapük
|
178
|
-
CY;;Isi Welsh
|
179
177
|
WA;;Isi-Waloni
|
180
178
|
WO;;Wolof
|
181
179
|
XH;;Isi-Xhosa
|
182
180
|
YI;;Yiddish
|
183
181
|
YO;;Yoruba
|
184
182
|
ZA;;Zhuang; Chuang
|
183
|
+
ZH;;Isi-Shayina
|
185
184
|
ZU;;Isi-Zulu
|
@@ -1,20 +1,20 @@
|
|
1
|
-
require '
|
2
|
-
require 'rexml/document'
|
1
|
+
require 'json'
|
3
2
|
|
4
3
|
module I18nData
|
5
4
|
# fetches data online from debian git
|
6
5
|
module LiveDataProvider
|
7
6
|
extend self
|
8
7
|
|
9
|
-
|
10
|
-
:countries => '
|
11
|
-
:languages => '
|
8
|
+
JSON_CODES = {
|
9
|
+
:countries => 'data/iso_3166-1.json',
|
10
|
+
:languages => 'data/iso_639-2.json'
|
12
11
|
}
|
12
|
+
|
13
13
|
TRANSLATIONS = {
|
14
|
-
:countries => 'iso_3166/',
|
15
|
-
:languages => 'iso_639/'
|
14
|
+
:countries => 'iso_3166-1/',
|
15
|
+
:languages => 'iso_639-2/'
|
16
16
|
}
|
17
|
-
REPO = "
|
17
|
+
REPO = "https://salsa.debian.org/iso-codes-team/iso-codes.git"
|
18
18
|
CLONE_DEST = "/tmp/i18n_data_iso_clone"
|
19
19
|
|
20
20
|
def codes(type, language_code)
|
@@ -79,9 +79,9 @@ module I18nData
|
|
79
79
|
def english_languages
|
80
80
|
@english_languages ||= begin
|
81
81
|
codes = {}
|
82
|
-
|
83
|
-
name = entry
|
84
|
-
code = entry
|
82
|
+
json(:languages)['639-2'].each do |entry|
|
83
|
+
name = entry['name'].to_s
|
84
|
+
code = entry['alpha_2'].to_s.upcase
|
85
85
|
next if code.empty? or name.empty?
|
86
86
|
codes[code] = name
|
87
87
|
end
|
@@ -92,10 +92,9 @@ module I18nData
|
|
92
92
|
def english_countries
|
93
93
|
@english_countries ||= begin
|
94
94
|
codes = {}
|
95
|
-
|
96
|
-
name = entry
|
97
|
-
|
98
|
-
code = entry.attributes['alpha_2_code'].to_s.upcase
|
95
|
+
json(:countries)['3166-1'].each do |entry|
|
96
|
+
name = (entry['common_name'] || entry['name']).to_s
|
97
|
+
code = entry['alpha_2'].to_s.upcase
|
99
98
|
codes[code] = name
|
100
99
|
end
|
101
100
|
codes
|
@@ -115,8 +114,8 @@ module I18nData
|
|
115
114
|
File.read("#{CLONE_DEST}/#{url}")
|
116
115
|
end
|
117
116
|
|
118
|
-
def
|
119
|
-
|
117
|
+
def json(type)
|
118
|
+
JSON.parse(get(JSON_CODES[type]))
|
120
119
|
end
|
121
120
|
end
|
122
121
|
end
|
data/lib/i18n_data/version.rb
CHANGED
data/lib/i18n_data.rb
CHANGED
@@ -47,13 +47,9 @@ module I18nData
|
|
47
47
|
|
48
48
|
private
|
49
49
|
|
50
|
-
def fetch(
|
51
|
-
@cache ||= {}
|
52
|
-
|
53
|
-
@cache[args]
|
54
|
-
else
|
55
|
-
@cache[args] = yield
|
56
|
-
end
|
50
|
+
def fetch(type, language_code)
|
51
|
+
@cache ||= Hash.new { |h, k| h[k] = {} }
|
52
|
+
@cache[type].fetch(language_code) { @cache[type][language_code] = yield }
|
57
53
|
end
|
58
54
|
|
59
55
|
# hardcode languages that do not have a default type
|
@@ -69,20 +65,33 @@ module I18nData
|
|
69
65
|
search = search.strip
|
70
66
|
|
71
67
|
# common languages first <-> faster in majority of cases
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
return code if match_found
|
68
|
+
language_codes = ['EN','ES','FR','DE','ZH'] | available_language_codes
|
69
|
+
|
70
|
+
language_codes.each do |language_code|
|
71
|
+
options =
|
72
|
+
begin
|
73
|
+
send(type, language_code)
|
74
|
+
rescue NoTranslationAvailable
|
75
|
+
next
|
81
76
|
end
|
82
|
-
|
77
|
+
|
78
|
+
options.each do |code, name|
|
79
|
+
# support "Dutch" and "Dutch; Flemish", checks for inclusion first to skip the splitting
|
80
|
+
# then check for exact match
|
81
|
+
return code if name.include?(search) && (name == search || name.split('; ').include?(search))
|
83
82
|
end
|
84
83
|
end
|
85
|
-
|
84
|
+
|
85
|
+
nil # not found
|
86
|
+
end
|
87
|
+
|
88
|
+
# NOTE: this is not perfect since the used provider might have more or less languages available
|
89
|
+
# but it's better than just using the available english language codes
|
90
|
+
def available_language_codes
|
91
|
+
@available_languges ||= begin
|
92
|
+
files = Dir[File.expand_path("../../cache/file_data_provider/languages-*", __FILE__)]
|
93
|
+
files.map! { |f| f[/languages-(.*)\./, 1] }
|
94
|
+
end
|
86
95
|
end
|
87
96
|
end
|
88
97
|
end
|