bcp47 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -6
- data/Gemfile.lock +17 -0
- data/Guardfile +24 -0
- data/VERSION +1 -1
- data/bcp47.gemspec +14 -2
- data/data/iso-3166-1.yml +492 -0
- data/data/iso-639-1.yml +484 -0
- data/lib/bcp47.rb +3 -0
- data/lib/bcp47/subtag/base.rb +32 -0
- data/lib/bcp47/subtag/language.rb +19 -0
- data/lib/bcp47/subtag/region.rb +7 -0
- data/spec/fixtures/base.yml +6 -0
- data/spec/lib/bcp47/subtag/base_spec.rb +48 -0
- data/spec/lib/bcp47/subtag/language_spec.rb +57 -0
- data/spec/lib/bcp47/subtag/region_spec.rb +17 -0
- metadata +31 -11
- data/spec/bcp47_spec.rb +0 -7
data/data/iso-639-1.yml
ADDED
@@ -0,0 +1,484 @@
|
|
1
|
+
# Cleaned up from
|
2
|
+
# http://www.loc.gov/standards/iso639-2/php/code_list.php
|
3
|
+
aa:
|
4
|
+
name: Afar
|
5
|
+
ab:
|
6
|
+
name: Abkhazian
|
7
|
+
ae:
|
8
|
+
name: Avestan
|
9
|
+
af:
|
10
|
+
name: Afrikaans
|
11
|
+
ak:
|
12
|
+
name: Akan
|
13
|
+
am:
|
14
|
+
name: Amharic
|
15
|
+
an:
|
16
|
+
name: Aragonese
|
17
|
+
ar:
|
18
|
+
name: Arabic
|
19
|
+
direction: rtl
|
20
|
+
plural_rule_names:
|
21
|
+
- zero
|
22
|
+
- one
|
23
|
+
- two
|
24
|
+
- few
|
25
|
+
- many
|
26
|
+
- other
|
27
|
+
as:
|
28
|
+
name: Assamese
|
29
|
+
av:
|
30
|
+
name: Avaric
|
31
|
+
ay:
|
32
|
+
name: Aymara
|
33
|
+
az:
|
34
|
+
name: Azerbaijani
|
35
|
+
plural_rule_names:
|
36
|
+
- other
|
37
|
+
ba:
|
38
|
+
name: Bashkir
|
39
|
+
be:
|
40
|
+
name: Belarusian
|
41
|
+
bg:
|
42
|
+
name: Bulgarian
|
43
|
+
bh:
|
44
|
+
name: Bihari
|
45
|
+
bi:
|
46
|
+
name: Bislama
|
47
|
+
bm:
|
48
|
+
name: Bambara
|
49
|
+
bn:
|
50
|
+
name: Bengali
|
51
|
+
bo:
|
52
|
+
name: Tibetan
|
53
|
+
br:
|
54
|
+
name: Breton
|
55
|
+
bs:
|
56
|
+
name: Bosnian
|
57
|
+
plural_rule_names:
|
58
|
+
- one
|
59
|
+
- few
|
60
|
+
- many
|
61
|
+
- other
|
62
|
+
ca:
|
63
|
+
name: Catalan
|
64
|
+
ce:
|
65
|
+
name: Chechen
|
66
|
+
ch:
|
67
|
+
name: Chamorro
|
68
|
+
co:
|
69
|
+
name: Corsican
|
70
|
+
cr:
|
71
|
+
name: Cree
|
72
|
+
cs:
|
73
|
+
name: Czech
|
74
|
+
plural_rule_names:
|
75
|
+
- one
|
76
|
+
- few
|
77
|
+
- other
|
78
|
+
cu:
|
79
|
+
name: Church Slavic
|
80
|
+
cv:
|
81
|
+
name: Chuvash
|
82
|
+
cy:
|
83
|
+
name: Welsh
|
84
|
+
plural_rule_names:
|
85
|
+
- one
|
86
|
+
- two
|
87
|
+
- many
|
88
|
+
- other
|
89
|
+
da:
|
90
|
+
name: Danish
|
91
|
+
de:
|
92
|
+
name: German
|
93
|
+
dv:
|
94
|
+
name: Divehi
|
95
|
+
dz:
|
96
|
+
name: Dzongkha
|
97
|
+
ee:
|
98
|
+
name: Ewe
|
99
|
+
el:
|
100
|
+
name: Greek
|
101
|
+
en:
|
102
|
+
name: English
|
103
|
+
eo:
|
104
|
+
name: Esperanto
|
105
|
+
es:
|
106
|
+
name: Spanish
|
107
|
+
et:
|
108
|
+
name: Estonian
|
109
|
+
eu:
|
110
|
+
name: Basque
|
111
|
+
fa:
|
112
|
+
name: Persian
|
113
|
+
direction: rtl
|
114
|
+
plural_rule_names:
|
115
|
+
- other
|
116
|
+
ff:
|
117
|
+
name: Fulah
|
118
|
+
fi:
|
119
|
+
name: Finnish
|
120
|
+
fj:
|
121
|
+
name: Fijian
|
122
|
+
fo:
|
123
|
+
name: Faroese
|
124
|
+
fr:
|
125
|
+
name: French
|
126
|
+
fy:
|
127
|
+
name: Western Frisian
|
128
|
+
ga:
|
129
|
+
name: Irish
|
130
|
+
gd:
|
131
|
+
name: Gaelic
|
132
|
+
gl:
|
133
|
+
name: Galician
|
134
|
+
gn:
|
135
|
+
name: Guarani
|
136
|
+
gu:
|
137
|
+
name: Gujarati
|
138
|
+
gv:
|
139
|
+
name: Manx
|
140
|
+
ha:
|
141
|
+
name: Hausa
|
142
|
+
he:
|
143
|
+
name: Hebrew
|
144
|
+
direction: rtl
|
145
|
+
hi:
|
146
|
+
name: Hindi
|
147
|
+
ho:
|
148
|
+
name: Hiri Motu
|
149
|
+
hr:
|
150
|
+
name: Croatian
|
151
|
+
plural_rule_names:
|
152
|
+
- one
|
153
|
+
- few
|
154
|
+
- many
|
155
|
+
- other
|
156
|
+
ht:
|
157
|
+
name: Haitian
|
158
|
+
hu:
|
159
|
+
name: Hungarian
|
160
|
+
plural_rule_names:
|
161
|
+
- other
|
162
|
+
hy:
|
163
|
+
name: Armenian
|
164
|
+
hz:
|
165
|
+
name: Herero
|
166
|
+
ia:
|
167
|
+
name: Interlingua
|
168
|
+
id:
|
169
|
+
name: Indonesian
|
170
|
+
plural_rule_names:
|
171
|
+
- other
|
172
|
+
ie:
|
173
|
+
name: Interlingue
|
174
|
+
ig:
|
175
|
+
name: Igbo
|
176
|
+
ii:
|
177
|
+
name: Sichuan Yi
|
178
|
+
ik:
|
179
|
+
name: Inupiaq
|
180
|
+
io:
|
181
|
+
name: Ido
|
182
|
+
is:
|
183
|
+
name: Icelandic
|
184
|
+
it:
|
185
|
+
name: Italian
|
186
|
+
iu:
|
187
|
+
name: Inuktitut
|
188
|
+
ja:
|
189
|
+
name: Japanese
|
190
|
+
plural_rule_names:
|
191
|
+
- other
|
192
|
+
jv:
|
193
|
+
name: Javanese
|
194
|
+
ka:
|
195
|
+
name: Georgian
|
196
|
+
kg:
|
197
|
+
name: Kongo
|
198
|
+
ki:
|
199
|
+
name: Kikuyu
|
200
|
+
kj:
|
201
|
+
name: Kuanyama
|
202
|
+
kk:
|
203
|
+
name: Kazakh
|
204
|
+
kl:
|
205
|
+
name: Kalaallisut
|
206
|
+
km:
|
207
|
+
name: Central Khmer
|
208
|
+
kn:
|
209
|
+
name: Kannada
|
210
|
+
plural_rule_names:
|
211
|
+
- other
|
212
|
+
ko:
|
213
|
+
name: Korean
|
214
|
+
plural_rule_names:
|
215
|
+
- other
|
216
|
+
kr:
|
217
|
+
name: Kanuri
|
218
|
+
ks:
|
219
|
+
name: Kashmiri
|
220
|
+
ku:
|
221
|
+
name: Kurdish
|
222
|
+
kv:
|
223
|
+
name: Komi
|
224
|
+
kw:
|
225
|
+
name: Cornish
|
226
|
+
ky:
|
227
|
+
name: Kirghiz
|
228
|
+
la:
|
229
|
+
name: Latin
|
230
|
+
lb:
|
231
|
+
name: Luxembourgish
|
232
|
+
lg:
|
233
|
+
name: Ganda
|
234
|
+
li:
|
235
|
+
name: Limburgan
|
236
|
+
ln:
|
237
|
+
name: Lingala
|
238
|
+
lo:
|
239
|
+
name: Lao
|
240
|
+
plural_rule_names:
|
241
|
+
- zero
|
242
|
+
- one
|
243
|
+
- two
|
244
|
+
- few
|
245
|
+
- many
|
246
|
+
- other
|
247
|
+
lt:
|
248
|
+
name: Lithuanian
|
249
|
+
plural_rule_names:
|
250
|
+
- one
|
251
|
+
- few
|
252
|
+
- other
|
253
|
+
lu:
|
254
|
+
name: Luba-Katanga
|
255
|
+
lv:
|
256
|
+
name: Latvian
|
257
|
+
plural_rule_names:
|
258
|
+
- zero
|
259
|
+
- one
|
260
|
+
- other
|
261
|
+
mg:
|
262
|
+
name: Malagasy
|
263
|
+
mh:
|
264
|
+
name: Marshallese
|
265
|
+
mi:
|
266
|
+
name: Maori
|
267
|
+
mk:
|
268
|
+
name: Macedonian
|
269
|
+
ml:
|
270
|
+
name: Malayalam
|
271
|
+
mn:
|
272
|
+
name: Mongolian
|
273
|
+
mr:
|
274
|
+
name: Marathi
|
275
|
+
ms:
|
276
|
+
name: Malay
|
277
|
+
ms:
|
278
|
+
name: Malay
|
279
|
+
mt:
|
280
|
+
name: Maltese
|
281
|
+
my:
|
282
|
+
name: Burmese
|
283
|
+
plural_rule_names:
|
284
|
+
plural_rule_names:
|
285
|
+
- one
|
286
|
+
- few
|
287
|
+
- other
|
288
|
+
- other
|
289
|
+
na:
|
290
|
+
name: Nauru
|
291
|
+
nb:
|
292
|
+
name: Norwegian Bokmål
|
293
|
+
nd:
|
294
|
+
name: North Ndebele
|
295
|
+
ne:
|
296
|
+
name: Nepali
|
297
|
+
ng:
|
298
|
+
name: Ndonga
|
299
|
+
nl:
|
300
|
+
name: Dutch
|
301
|
+
nn:
|
302
|
+
name: Norwegian Nynorsk
|
303
|
+
no:
|
304
|
+
name: Norwegian
|
305
|
+
nr:
|
306
|
+
name: South Ndebele
|
307
|
+
nv:
|
308
|
+
name: Navajo
|
309
|
+
ny:
|
310
|
+
name: Chichewa
|
311
|
+
oc:
|
312
|
+
name: Occitan
|
313
|
+
oj:
|
314
|
+
name: Ojibwa
|
315
|
+
om:
|
316
|
+
name: Oromo
|
317
|
+
or:
|
318
|
+
name: Oriya
|
319
|
+
os:
|
320
|
+
name: Ossetian
|
321
|
+
pa:
|
322
|
+
name: Panjabi
|
323
|
+
pi:
|
324
|
+
name: Pali
|
325
|
+
pl:
|
326
|
+
name: Polish
|
327
|
+
plural_rule_names:
|
328
|
+
- one
|
329
|
+
- few
|
330
|
+
- other
|
331
|
+
ps:
|
332
|
+
name: Pushto
|
333
|
+
pt:
|
334
|
+
name: Portuguese
|
335
|
+
qu:
|
336
|
+
name: Quechua
|
337
|
+
rm:
|
338
|
+
name: Romansh
|
339
|
+
plural_rule_names:
|
340
|
+
- zero
|
341
|
+
- one
|
342
|
+
- two
|
343
|
+
- few
|
344
|
+
- many
|
345
|
+
- other
|
346
|
+
rn:
|
347
|
+
name: Rundi
|
348
|
+
ro:
|
349
|
+
name: Romanian
|
350
|
+
plural_rule_names:
|
351
|
+
- one
|
352
|
+
- few
|
353
|
+
- other
|
354
|
+
ru:
|
355
|
+
name: Russian
|
356
|
+
plural_rule_names:
|
357
|
+
- one
|
358
|
+
- few
|
359
|
+
- many
|
360
|
+
- other
|
361
|
+
rw:
|
362
|
+
name: Kinyarwanda
|
363
|
+
sa:
|
364
|
+
name: Sanskrit
|
365
|
+
sc:
|
366
|
+
name: Sardinian
|
367
|
+
sd:
|
368
|
+
name: Sindhi
|
369
|
+
se:
|
370
|
+
name: Northern Sami
|
371
|
+
sg:
|
372
|
+
name: Sango
|
373
|
+
si:
|
374
|
+
name: Sinhala
|
375
|
+
sk:
|
376
|
+
name: Slovak
|
377
|
+
plural_rule_names:
|
378
|
+
- one
|
379
|
+
- few
|
380
|
+
- other
|
381
|
+
sl:
|
382
|
+
name: Slovenian
|
383
|
+
plural_rule_names:
|
384
|
+
- one
|
385
|
+
- two
|
386
|
+
- few
|
387
|
+
- other
|
388
|
+
sm:
|
389
|
+
name: Samoan
|
390
|
+
sn:
|
391
|
+
name: Shona
|
392
|
+
so:
|
393
|
+
name: Somali
|
394
|
+
sq:
|
395
|
+
name: Albanian
|
396
|
+
sr:
|
397
|
+
name: Serbian
|
398
|
+
plural_rule_names:
|
399
|
+
- one
|
400
|
+
- few
|
401
|
+
- many
|
402
|
+
- other
|
403
|
+
ss:
|
404
|
+
name: Swati
|
405
|
+
st:
|
406
|
+
name: Sotho, Southern
|
407
|
+
su:
|
408
|
+
name: Sundanese
|
409
|
+
sv:
|
410
|
+
name: Swedish
|
411
|
+
sw:
|
412
|
+
name: Swahili
|
413
|
+
ta:
|
414
|
+
name: Tamil
|
415
|
+
te:
|
416
|
+
name: Telugu
|
417
|
+
tg:
|
418
|
+
name: Tajik
|
419
|
+
th:
|
420
|
+
name: Thai
|
421
|
+
plural_rule_names:
|
422
|
+
- other
|
423
|
+
ti:
|
424
|
+
name: Tigrinya
|
425
|
+
tk:
|
426
|
+
name: Turkmen
|
427
|
+
tl:
|
428
|
+
name: Tagalog
|
429
|
+
tn:
|
430
|
+
name: Tswana
|
431
|
+
to:
|
432
|
+
name: Tonga
|
433
|
+
tr:
|
434
|
+
name: Turkish
|
435
|
+
plural_rule_names:
|
436
|
+
- other
|
437
|
+
ts:
|
438
|
+
name: Tsonga
|
439
|
+
tt:
|
440
|
+
name: Tatar
|
441
|
+
tw:
|
442
|
+
name: Twi
|
443
|
+
ty:
|
444
|
+
name: Tahitian
|
445
|
+
ug:
|
446
|
+
name: Uighur
|
447
|
+
uk:
|
448
|
+
name: Ukrainian
|
449
|
+
plural_rule_names:
|
450
|
+
- one
|
451
|
+
- few
|
452
|
+
- many
|
453
|
+
- other
|
454
|
+
ur:
|
455
|
+
name: Urdu
|
456
|
+
direction: rtl
|
457
|
+
uz:
|
458
|
+
name: Uzbek
|
459
|
+
ve:
|
460
|
+
name: Venda
|
461
|
+
vo:
|
462
|
+
name: Volapuk
|
463
|
+
vi:
|
464
|
+
name: Vietnamese
|
465
|
+
plural_rule_names:
|
466
|
+
- other
|
467
|
+
wa:
|
468
|
+
name: Walloon
|
469
|
+
wo:
|
470
|
+
name: Wolof
|
471
|
+
xh:
|
472
|
+
name: Xhosa
|
473
|
+
yi:
|
474
|
+
name: Yiddish
|
475
|
+
yo:
|
476
|
+
name: Yoruba
|
477
|
+
za:
|
478
|
+
name: Zhuang
|
479
|
+
zh:
|
480
|
+
name: Chinese
|
481
|
+
plural_rule_names:
|
482
|
+
- other
|
483
|
+
zu:
|
484
|
+
name: Zulu
|