1097
by Hilaire Fernandes
Move in necessary packages |
1 |
'From Cuis 6.0 [latest update: #5347] on 3 July 2022 at 1:31:40 pm'!
|
2 |
'Description '!
|
|
3 |
!provides: 'System-Locales' 1 8! |
|
4 |
SystemOrganization addCategory: 'System-Locales'! |
|
5 |
||
6 |
||
7 |
!classDefinition: #ISOLanguageDefinition category: 'System-Locales'! |
|
8 |
Object subclass: #ISOLanguageDefinition |
|
9 |
instanceVariableNames: 'iso3 iso2 iso3Alternate language' |
|
10 |
classVariableNames: 'ISO2Countries ISO2Table ISO3Countries ISO3Table' |
|
11 |
poolDictionaries: '' |
|
12 |
category: 'System-Locales'! |
|
13 |
!classDefinition: 'ISOLanguageDefinition class' category: 'System-Locales'! |
|
14 |
ISOLanguageDefinition class
|
|
15 |
instanceVariableNames: ''! |
|
16 |
||
17 |
!classDefinition: #Locale category: 'System-Locales'! |
|
18 |
Object subclass: #Locale |
|
19 |
instanceVariableNames: 'id' |
|
20 |
classVariableNames: 'Activated Current CurrentPlatform KnownLocales LanguageSymbols LocaleChangeListeners PlatformEncodings Previous' |
|
21 |
poolDictionaries: '' |
|
22 |
category: 'System-Locales'! |
|
23 |
!classDefinition: 'Locale class' category: 'System-Locales'! |
|
24 |
Locale class
|
|
25 |
instanceVariableNames: ''! |
|
26 |
||
27 |
!classDefinition: #LocaleID category: 'System-Locales'! |
|
28 |
Object subclass: #LocaleID |
|
29 |
instanceVariableNames: 'isoLanguage isoCountry' |
|
30 |
classVariableNames: '' |
|
31 |
poolDictionaries: 'nil' |
|
32 |
category: 'System-Locales'! |
|
33 |
!classDefinition: 'LocaleID class' category: 'System-Locales'! |
|
34 |
LocaleID class
|
|
35 |
instanceVariableNames: ''! |
|
36 |
||
37 |
||
38 |
!ISOLanguageDefinition commentStamp: '' prior: 0! |
|
39 |
The language definitions from International Organization for Standardization. |
|
40 |
||
41 |
You can obtain the list of the all the ISOCountries and languages.! |
|
42 |
||
43 |
!Locale commentStamp: '<historical>' prior: 0! |
|
44 |
Locale current |
|
45 |
Locale current isoLanguage |
|
46 |
Locale current isoCountry |
|
47 |
||
48 |
||
49 |
References:
|
|
50 |
http://www.w3.org/WAI/ER/IG/ert/iso639.htm |
|
51 |
http://www.oasis-open.org/cover/iso639a.html |
|
52 |
http://oss.software.ibm.com/cvs/icu/~checkout~/icuhtml/design/language_code_issues.html |
|
53 |
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10 |
|
54 |
||
55 |
ISO 3166 |
|
56 |
http://mitglied.lycos.de/buran/knowhow/codes/locales/! |
|
57 |
||
58 |
!LocaleID commentStamp: '' prior: 0! |
|
59 |
The ID for localization!
|
|
60 |
||
61 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
62 |
iso2
|
|
63 |
^iso2 ifNil: [self iso3]! ! |
|
64 |
||
65 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
66 |
iso2: aString |
|
67 |
iso2 _ aString ifEmpty: [nil] ifNotEmpty: [aString]! ! |
|
68 |
||
69 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
70 |
iso3
|
|
71 |
^iso3 ifNil: ['']! ! |
|
72 |
||
73 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
74 |
iso3: aString |
|
75 |
iso3 _ aString ifEmpty: [nil] ifNotEmpty: [aString]! ! |
|
76 |
||
77 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
78 |
iso3Alternate
|
|
79 |
^iso3Alternate ifNil: ['']! ! |
|
80 |
||
81 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
82 |
iso3Alternate: aString |
|
83 |
iso3Alternate _ aString ifEmpty: [nil] ifNotEmpty: [aString]! ! |
|
84 |
||
85 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
86 |
language
|
|
87 |
^ language! ! |
|
88 |
||
89 |
!ISOLanguageDefinition methodsFor: 'accessing'! |
|
90 |
language: aString |
|
91 |
language _ aString! ! |
|
92 |
||
93 |
!ISOLanguageDefinition class methodsFor: 'initialization'! |
|
94 |
initialize
|
|
95 |
"self initialize"
|
|
96 |
||
97 |
ISO3Table _ nil. |
|
98 |
ISO2Table _ nil! ! |
|
99 |
||
100 |
!ISOLanguageDefinition class methodsFor: 'private'! |
|
101 |
initISOCountries
|
|
102 |
"self initISOCountries"
|
|
103 |
| iso3166Table | |
|
104 |
iso3166Table _ self buildIso3166CodesTables. |
|
105 |
ISO2Countries _ Dictionary new. |
|
106 |
ISO3Countries _ Dictionary new. |
|
107 |
iso3166Table do: [:entry | |
|
108 |
ISO2Countries at: (entry at: 2) put: (entry at: 1). |
|
109 |
ISO3Countries at: (entry at: 3) put: (entry at: 1)]. |
|
110 |
! !
|
|
111 |
||
112 |
!ISOLanguageDefinition class methodsFor: 'private'! |
|
113 |
isoLanguages
|
|
114 |
"ISO 639: 3-letter codes"
|
|
115 |
^'abk ab Abkhazian |
|
116 |
ace Achinese
|
|
117 |
ach Acoli
|
|
118 |
ada Adangme
|
|
119 |
aar aa Afar
|
|
120 |
afh Afrihili
|
|
121 |
afr af Afrikaans
|
|
122 |
afa Afro-Asiatic (Other)
|
|
123 |
aka Akan
|
|
124 |
akk Akkadian
|
|
125 |
alb/sqi sq Albanian
|
|
126 |
ale Aleut
|
|
127 |
alg Algonquian languages
|
|
128 |
tut Altaic (Other)
|
|
129 |
amh am Amharic
|
|
130 |
apa Apache languages
|
|
131 |
ara ar Arabic
|
|
132 |
arc Aramaic
|
|
133 |
arp Arapaho
|
|
134 |
arn Araucanian
|
|
135 |
arw Arawak
|
|
136 |
arm/hye hy Armenian
|
|
137 |
art Artificial (Other)
|
|
138 |
asm as Assamese
|
|
139 |
ath Athapascan languages
|
|
140 |
map Austronesian (Other)
|
|
141 |
ava Avaric
|
|
142 |
ave Avestan
|
|
143 |
awa Awadhi
|
|
144 |
aym ay Aymara
|
|
145 |
aze az Azerbaijani
|
|
146 |
nah Aztec
|
|
147 |
ban Balinese
|
|
148 |
bat Baltic (Other)
|
|
149 |
bal Baluchi
|
|
150 |
bam Bambara
|
|
151 |
bai Bamileke languages
|
|
152 |
bad Banda
|
|
153 |
bnt Bantu (Other)
|
|
154 |
bas Basa
|
|
155 |
bak ba Bashkir
|
|
156 |
baq/eus eu Basque
|
|
157 |
bej Beja
|
|
158 |
bem Bemba
|
|
159 |
ben bn Bengali
|
|
160 |
ber Berber (Other)
|
|
161 |
bho Bhojpuri
|
|
162 |
bih bh Bihari
|
|
163 |
bik Bikol
|
|
164 |
bin Bini
|
|
165 |
bis bi Bislama
|
|
166 |
bra Braj
|
|
167 |
bre be Breton
|
|
168 |
bug Buginese
|
|
169 |
bul bg Bulgarian
|
|
170 |
bua Buriat
|
|
171 |
bur/mya my Burmese
|
|
172 |
bel be Byelorussian
|
|
173 |
cad Caddo
|
|
174 |
car Carib
|
|
175 |
cat ca Catalan
|
|
176 |
cau Caucasian (Other)
|
|
177 |
ceb Cebuano
|
|
178 |
cel Celtic (Other)
|
|
179 |
cai Central American Indian (Other)
|
|
180 |
chg Chagatai
|
|
181 |
cha Chamorro
|
|
182 |
che Chechen
|
|
183 |
chr Cherokee
|
|
184 |
chy Cheyenne
|
|
185 |
chb Chibcha
|
|
186 |
chi/zho zh Chinese
|
|
187 |
chn Chinook jargon
|
|
188 |
cho Choctaw
|
|
189 |
chu Church Slavic
|
|
190 |
chv Chuvash
|
|
191 |
cop Coptic
|
|
192 |
cor Cornish
|
|
193 |
cos co Corsican
|
|
194 |
cre Cree
|
|
195 |
mus Creek
|
|
196 |
crp Creoles and Pidgins (Other)
|
|
197 |
cpe Creoles and Pidgins, English-based (Other)
|
|
198 |
cpf Creoles and Pidgins, French-based (Other)
|
|
199 |
cpp Creoles and Pidgins, Portuguese-based (Other)
|
|
200 |
cus Cushitic (Other)
|
|
201 |
hr Croatian
|
|
202 |
ces/cze cs Czech
|
|
203 |
dak Dakota
|
|
204 |
dan da Danish
|
|
205 |
del Delaware
|
|
206 |
din Dinka
|
|
207 |
div Divehi
|
|
208 |
doi Dogri
|
|
209 |
dra Dravidian (Other)
|
|
210 |
dua Duala
|
|
211 |
dut/nla nl Dutch
|
|
212 |
dum Dutch, Middle (ca. 1050-1350)
|
|
213 |
dyu Dyula
|
|
214 |
dzo dz Dzongkha
|
|
215 |
efi Efik
|
|
216 |
egy Egyptian (Ancient)
|
|
217 |
eka Ekajuk
|
|
218 |
elx Elamite
|
|
219 |
eng en English
|
|
220 |
enm English, Middle (ca. 1100-1500)
|
|
221 |
ang English, Old (ca. 450-1100)
|
|
222 |
esk Eskimo (Other)
|
|
223 |
epo eo Esperanto
|
|
224 |
est et Estonian
|
|
225 |
ewe Ewe
|
|
226 |
ewo Ewondo
|
|
227 |
fan Fang
|
|
228 |
fat Fanti
|
|
229 |
fao fo Faroese
|
|
230 |
fij fj Fijian
|
|
231 |
fin fi Finnish
|
|
232 |
fiu Finno-Ugrian (Other)
|
|
233 |
fon Fon
|
|
234 |
fra/fre fr French
|
|
235 |
frm French, Middle (ca. 1400-1600)
|
|
236 |
fro French, Old (842- ca. 1400)
|
|
237 |
fry fy Frisian
|
|
238 |
ful Fulah
|
|
239 |
gaa Ga
|
|
240 |
gae/gdh Gaelic (Scots)
|
|
241 |
glg gl Gallegan
|
|
242 |
lug Ganda
|
|
243 |
gay Gayo
|
|
244 |
gez Geez
|
|
245 |
geo/kat ka Georgian
|
|
246 |
deu/ger de German
|
|
247 |
gmh German, Middle High (ca. 1050-1500)
|
|
248 |
goh German, Old High (ca. 750-1050)
|
|
249 |
gem Germanic (Other)
|
|
250 |
gil Gilbertese
|
|
251 |
gon Gondi
|
|
252 |
got Gothic
|
|
253 |
grb Grebo
|
|
254 |
grc Greek, Ancient (to 1453)
|
|
255 |
ell/gre el Greek, Modern (1453-)
|
|
256 |
kal kl Greenlandic
|
|
257 |
grn gn Guarani
|
|
258 |
guj gu Gujarati
|
|
259 |
hai Haida
|
|
260 |
hau ha Hausa
|
|
261 |
haw Hawaiian
|
|
262 |
heb he Hebrew
|
|
263 |
her Herero
|
|
264 |
hil Hiligaynon
|
|
265 |
him Himachali
|
|
266 |
hin hi Hindi
|
|
267 |
hmo Hiri Motu
|
|
268 |
hun hu Hungarian
|
|
269 |
hup Hupa
|
|
270 |
iba Iban
|
|
271 |
ice/isl is Icelandic
|
|
272 |
ibo Igbo
|
|
273 |
ijo Ijo
|
|
274 |
ilo Iloko
|
|
275 |
inc Indic (Other)
|
|
276 |
ine Indo-European (Other)
|
|
277 |
ind id Indonesian
|
|
278 |
ina ia Interlingua (International Auxiliary language Association)
|
|
279 |
ine Interlingue
|
|
280 |
iku iu Inuktitut
|
|
281 |
ipk ik Inupiak
|
|
282 |
ira Iranian (Other)
|
|
283 |
gai/iri ga Irish
|
|
284 |
sga Irish, Old (to 900)
|
|
285 |
mga Irish, Middle (900 - 1200)
|
|
286 |
iro Iroquoian languages
|
|
287 |
ita it Italian
|
|
288 |
jpn ja Japanese
|
|
289 |
jav/jaw jv/jw Javanese
|
|
290 |
jrb Judeo-Arabic
|
|
291 |
jpr Judeo-Persian
|
|
292 |
kab Kabyle
|
|
293 |
kac Kachin
|
|
294 |
kam Kamba
|
|
295 |
kan kn Kannada
|
|
296 |
kau Kanuri
|
|
297 |
kaa Kara-Kalpak
|
|
298 |
kar Karen
|
|
299 |
kas ks Kashmiri
|
|
300 |
kaw Kawi
|
|
301 |
kaz kk Kazakh
|
|
302 |
kha Khasi
|
|
303 |
khm km Khmer
|
|
304 |
khi Khoisan (Other)
|
|
305 |
kho Khotanese
|
|
306 |
kik Kikuyu
|
|
307 |
kin rw Kinyarwanda
|
|
308 |
kir ky Kirghiz
|
|
309 |
kom Komi
|
|
310 |
kon Kongo
|
|
311 |
kok Konkani
|
|
312 |
kor ko Korean
|
|
313 |
kpe Kpelle
|
|
314 |
kro Kru
|
|
315 |
kua Kuanyama
|
|
316 |
kum Kumyk
|
|
317 |
kur ku Kurdish
|
|
318 |
kru Kurukh
|
|
319 |
kus Kusaie
|
|
320 |
kut Kutenai
|
|
321 |
lad Ladino
|
|
322 |
lah Lahnda
|
|
323 |
lam Lamba
|
|
324 |
oci oc Langue d''Oc (post 1500)
|
|
325 |
lao lo Lao
|
|
326 |
lat la Latin
|
|
327 |
lav lv Latvian
|
|
328 |
ltz Letzeburgesch
|
|
329 |
lez Lezghian
|
|
330 |
lin ln Lingala
|
|
331 |
lit lt Lithuanian
|
|
332 |
loz Lozi
|
|
333 |
lub Luba-Katanga
|
|
334 |
lui Luiseno
|
|
335 |
lun Lunda
|
|
336 |
luo Luo (Kenya and Tanzania)
|
|
337 |
mac/mak mk Macedonian
|
|
338 |
mad Madurese
|
|
339 |
mag Magahi
|
|
340 |
mai Maithili
|
|
341 |
mak Makasar
|
|
342 |
mlg mg Malagasy
|
|
343 |
may/msa ms Malay
|
|
344 |
mal Malayalam
|
|
345 |
mlt ml Maltese
|
|
346 |
man Mandingo
|
|
347 |
mni Manipuri
|
|
348 |
mno Manobo languages
|
|
349 |
max Manx
|
|
350 |
mao/mri mi Maori
|
|
351 |
mar mr Marathi
|
|
352 |
chm Mari
|
|
353 |
mah Marshall
|
|
354 |
mwr Marwari
|
|
355 |
mas Masai
|
|
356 |
myn Mayan languages
|
|
357 |
men Mende
|
|
358 |
mic Micmac
|
|
359 |
min Minangkabau
|
|
360 |
mis Miscellaneous (Other)
|
|
361 |
moh Mohawk
|
|
362 |
mol mo Moldavian
|
|
363 |
mkh Mon-Kmer (Other)
|
|
364 |
lol Mongo
|
|
365 |
mon mn Mongolian
|
|
366 |
mos Mossi
|
|
367 |
mul Multiple languages
|
|
368 |
mun Munda languages
|
|
369 |
nau na Nauru
|
|
370 |
nav Navajo
|
|
371 |
nde Ndebele, North
|
|
372 |
nbl Ndebele, South
|
|
373 |
ndo Ndongo
|
|
374 |
nep ne Nepali
|
|
375 |
new Newari
|
|
376 |
nic Niger-Kordofanian (Other)
|
|
377 |
ssa Nilo-Saharan (Other)
|
|
378 |
niu Niuean
|
|
379 |
non Norse, Old
|
|
380 |
nai North American Indian (Other)
|
|
381 |
nor no Norwegian
|
|
382 |
nno Norwegian (Nynorsk)
|
|
383 |
nub Nubian languages
|
|
384 |
nym Nyamwezi
|
|
385 |
nya Nyanja
|
|
386 |
nyn Nyankole
|
|
387 |
nyo Nyoro
|
|
388 |
nzi Nzima
|
|
389 |
oji Ojibwa
|
|
390 |
ori or Oriya
|
|
391 |
orm om Oromo
|
|
392 |
osa Osage
|
|
393 |
oss Ossetic
|
|
394 |
oto Otomian languages
|
|
395 |
pal Pahlavi
|
|
396 |
pau Palauan
|
|
397 |
pli Pali
|
|
398 |
pam Pampanga
|
|
399 |
pag Pangasinan
|
|
400 |
pan pa Panjabi
|
|
401 |
pap Papiamento
|
|
402 |
paa Papuan-Australian (Other)
|
|
403 |
fas/per fa Persian
|
|
404 |
peo Persian, Old (ca 600 - 400 B.C.)
|
|
405 |
phn Phoenician
|
|
406 |
pol pl Polish
|
|
407 |
pon Ponape
|
|
408 |
por pt Portuguese
|
|
409 |
pra Prakrit languages
|
|
410 |
pro Provencal, Old (to 1500)
|
|
411 |
pus ps Pushto
|
|
412 |
que qu Quechua
|
|
413 |
roh rm Rhaeto-Romance
|
|
414 |
raj Rajasthani
|
|
415 |
rar Rarotongan
|
|
416 |
roa Romance (Other)
|
|
417 |
ron/rum ro Romanian
|
|
418 |
rom Romany
|
|
419 |
run rn Rundi
|
|
420 |
rus ru Russian
|
|
421 |
sal Salishan languages
|
|
422 |
sam Samaritan Aramaic
|
|
423 |
smi Sami languages
|
|
424 |
smo sm Samoan
|
|
425 |
sad Sandawe
|
|
426 |
sag sg Sango
|
|
427 |
san sa Sanskrit
|
|
428 |
srd Sardinian
|
|
429 |
sco Scots
|
|
430 |
sel Selkup
|
|
431 |
sem Semitic (Other)
|
|
432 |
sr Serbian
|
|
433 |
scr sh Serbo-Croatian
|
|
434 |
srr Serer
|
|
435 |
shn Shan
|
|
436 |
sna sn Shona
|
|
437 |
sid Sidamo
|
|
438 |
bla Siksika
|
|
439 |
snd sd Sindhi
|
|
440 |
sin si Singhalese
|
|
441 |
sit Sino-Tibetan (Other)
|
|
442 |
sio Siouan languages
|
|
443 |
sla Slavic (Other)
|
|
444 |
ssw ss Siswant
|
|
445 |
slk/slo sk Slovak
|
|
446 |
slv sl Slovenian
|
|
447 |
sog Sogdian
|
|
448 |
som so Somali
|
|
449 |
son Songhai
|
|
450 |
wen Sorbian languages
|
|
451 |
nso Sotho, Northern
|
|
452 |
sot st Sotho, Southern
|
|
453 |
sai South American Indian (Other)
|
|
454 |
esl/spa es Spanish
|
|
455 |
suk Sukuma
|
|
456 |
sux Sumerian
|
|
457 |
sun su Sudanese
|
|
458 |
sus Susu
|
|
459 |
swa sw Swahili
|
|
460 |
ssw Swazi
|
|
461 |
sve/swe sv Swedish
|
|
462 |
syr Syriac
|
|
463 |
tgl tl Tagalog
|
|
464 |
tah Tahitian
|
|
465 |
tgk tg Tajik
|
|
466 |
tmh Tamashek
|
|
467 |
tam ta Tamil
|
|
468 |
tat tt Tatar
|
|
469 |
tel te Telugu
|
|
470 |
ter Tereno
|
|
471 |
tha th Thai
|
|
472 |
bod/tib bo Tibetan
|
|
473 |
tig Tigre
|
|
474 |
tir ti Tigrinya
|
|
475 |
tem Timne
|
|
476 |
tiv Tivi
|
|
477 |
tli Tlingit
|
|
478 |
tog to Tonga (Nyasa)
|
|
479 |
ton Tonga (Tonga Islands)
|
|
480 |
tru Truk
|
|
481 |
tsi Tsimshian
|
|
482 |
tso ts Tsonga
|
|
483 |
tsn tn Tswana
|
|
484 |
tum Tumbuka
|
|
485 |
tur tr Turkish
|
|
486 |
ota Turkish, Ottoman (1500 - 1928)
|
|
487 |
tuk tk Turkmen
|
|
488 |
tyv Tuvinian
|
|
489 |
twi tw Twi
|
|
490 |
uga Ugaritic
|
|
491 |
uig ug Uighur
|
|
492 |
ukr uk Ukrainian
|
|
493 |
umb Umbundu
|
|
494 |
und Undetermined
|
|
495 |
urd ur Urdu
|
|
496 |
uzb uz Uzbek
|
|
497 |
vai Vai
|
|
498 |
ven Venda
|
|
499 |
vie vi Vietnamese
|
|
500 |
vol vo Volapük
|
|
501 |
vot Votic
|
|
502 |
wak Wakashan languages
|
|
503 |
wal Walamo
|
|
504 |
war Waray
|
|
505 |
was Washo
|
|
506 |
cym/wel cy Welsh
|
|
507 |
wol wo Wolof
|
|
508 |
xho xh Xhosa
|
|
509 |
sah Yakut
|
|
510 |
yao Yao
|
|
511 |
yap Yap
|
|
512 |
yid yi Yiddish
|
|
513 |
yor yo Yoruba
|
|
514 |
zap Zapotec
|
|
515 |
zen Zenaga
|
|
516 |
zha za Zhuang
|
|
517 |
zul zu Zulu
|
|
518 |
zun Zuni'! ! |
|
519 |
||
520 |
!ISOLanguageDefinition class methodsFor: 'private'! |
|
521 |
readISOLanguagesFrom: stream |
|
522 |
"self readISOLanguagesFrom: self isoLanguages readStream "
|
|
523 |
| languages language code3 index line | |
|
524 |
languages _ Dictionary new. |
|
525 |
[stream atEnd |
|
526 |
or: [(line _ stream nextLine readStream) atEnd]] |
|
527 |
whileFalse: [
|
|
528 |
language _ self new. |
|
529 |
code3 _ line upTo: Character tab. |
|
530 |
(index _ code3 indexOf: $/) > 0 |
|
531 |
ifTrue: [
|
|
532 |
language iso3: (code3 copyFrom: 1 to: index-1). |
|
533 |
language iso3Alternate: (code3 copyFrom: index+1 to: code3 size)] |
|
534 |
ifFalse: [language iso3: code3]. |
|
535 |
language
|
|
536 |
iso2: (line upTo: Character tab); |
|
537 |
language: line upToEnd. |
|
538 |
languages at: language iso3 put: language]. |
|
539 |
^languages! ! |
|
540 |
||
541 |
!ISOLanguageDefinition class methodsFor: 'accessing'! |
|
542 |
iso2LanguageDefinition: aString |
|
543 |
^self iso2LanguageTable at: aString! ! |
|
544 |
||
545 |
!ISOLanguageDefinition class methodsFor: 'accessing'! |
|
546 |
iso3LanguageDefinition: aString |
|
547 |
^self iso3LanguageTable at: aString! ! |
|
548 |
||
549 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 2'! |
|
550 |
iso2Countries
|
|
551 |
"self iso2Countries"
|
|
552 |
"ISO2Countries _ nil. ISO3Countries := nil"
|
|
553 |
||
554 |
ISO2Countries ifNil: [self initISOCountries]. |
|
555 |
^ISO2Countries! ! |
|
556 |
||
557 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 2'! |
|
558 |
iso2LanguageTable
|
|
559 |
"self iso2LanguageTable"
|
|
560 |
||
561 |
ISO2Table ifNotNil: [^ISO2Table]. |
|
562 |
ISO2Table _ Dictionary new: self iso3LanguageTable basicSize. |
|
563 |
self iso3LanguageTable do: [:entry | |
|
564 |
ISO2Table at: entry iso2 put: entry]. |
|
565 |
^ISO2Table! ! |
|
566 |
||
567 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 3166'! |
|
568 |
buildIso3166CodesTables
|
|
569 |
"ISOLanguageDefinition buildIso3166CodesTables"
|
|
570 |
| rawdata stream country isoa2 isoa3 unNumeric macName macCode windowsName windowsCode empty table | |
|
571 |
rawdata _ self iso3166Codes. |
|
572 |
table _ OrderedCollection new: 200. |
|
573 |
stream _ rawdata readStream. |
|
574 |
empty _ 160 asCharacter asString. |
|
575 |
[stream atEnd] whileFalse: |
|
576 |
[country _ stream nextLine. |
|
577 |
isoa2 _ stream nextLine. |
|
578 |
isoa3 _ stream nextLine. |
|
579 |
unNumeric _ stream nextLine. |
|
580 |
windowsName _ stream nextLine. |
|
581 |
windowsName = empty ifTrue: [windowsName _ nil]. |
|
582 |
windowsCode _ stream nextLine. |
|
583 |
windowsCode = empty ifTrue: [windowsCode _ nil]. |
|
584 |
macName _ stream nextLine. |
|
585 |
macName = empty ifTrue: [macName _ nil]. |
|
586 |
macCode _ stream nextLine. |
|
587 |
macCode = empty ifTrue: [macCode _ nil]. |
|
588 |
table add: { country. isoa2. isoa3. unNumeric. windowsName. windowsCode. macName. macCode. }]. |
|
589 |
^table! ! |
|
590 |
||
591 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 3166'! |
|
592 |
initISO3LanguageTable
|
|
593 |
"self initISO3LanguageTable"
|
|
594 |
||
595 |
^ self readISOLanguagesFrom: self isoLanguages readStream. |
|
596 |
! !
|
|
597 |
||
598 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 3166'! |
|
599 |
iso3166Codes
|
|
600 |
"http://www.unicode.org/onlinedat/countries.html"
|
|
601 |
||
602 |
^'Ã…LAND ISLANDS |
|
603 |
AX
|
|
604 |
||
605 |
||
606 |
Â
|
|
607 |
Â
|
|
608 |
Â
|
|
609 |
Â
|
|
610 |
AFGHANISTAN
|
|
611 |
AF
|
|
612 |
AFG
|
|
613 |
004
|
|
614 |
Â
|
|
615 |
Â
|
|
616 |
Â
|
|
617 |
Â
|
|
618 |
ALBANIA
|
|
619 |
AL
|
|
620 |
ALB
|
|
621 |
008
|
|
622 |
CTRY_ALBANIA
|
|
623 |
355
|
|
624 |
Â
|
|
625 |
Â
|
|
626 |
ALGERIA
|
|
627 |
DZ
|
|
628 |
DZA
|
|
629 |
012
|
|
630 |
CTRY_ALGERIA
|
|
631 |
213
|
|
632 |
verArabic
|
|
633 |
16
|
|
634 |
AMERICAN SAMOA
|
|
635 |
AS
|
|
636 |
ASM
|
|
637 |
016
|
|
638 |
Â
|
|
639 |
Â
|
|
640 |
Â
|
|
641 |
Â
|
|
642 |
ANDORRA
|
|
643 |
AD
|
|
644 |
AND
|
|
645 |
020
|
|
646 |
Â
|
|
647 |
Â
|
|
648 |
Â
|
|
649 |
Â
|
|
650 |
ANGOLA
|
|
651 |
AO
|
|
652 |
AGO
|
|
653 |
024
|
|
654 |
Â
|
|
655 |
Â
|
|
656 |
Â
|
|
657 |
Â
|
|
658 |
ANGUILLA
|
|
659 |
AI
|
|
660 |
AIA
|
|
661 |
660
|
|
662 |
Â
|
|
663 |
Â
|
|
664 |
Â
|
|
665 |
Â
|
|
666 |
ANTARCTICA
|
|
667 |
AQ
|
|
668 |
ATA
|
|
669 |
010
|
|
670 |
Â
|
|
671 |
Â
|
|
672 |
Â
|
|
673 |
Â
|
|
674 |
ANTIGUA AND BARBUDA
|
|
675 |
AG
|
|
676 |
ATG
|
|
677 |
028
|
|
678 |
Â
|
|
679 |
Â
|
|
680 |
Â
|
|
681 |
Â
|
|
682 |
ARGENTINA
|
|
683 |
AR
|
|
684 |
ARG
|
|
685 |
032
|
|
686 |
CTRY_ARGENTINA
|
|
687 |
54
|
|
688 |
Â
|
|
689 |
Â
|
|
690 |
ARMENIA
|
|
691 |
AM
|
|
692 |
ARM
|
|
693 |
051
|
|
694 |
CTRY_ARMENIA
|
|
695 |
374
|
|
696 |
verArmenian
|
|
697 |
84
|
|
698 |
ARUBA
|
|
699 |
AW
|
|
700 |
ABW
|
|
701 |
533
|
|
702 |
Â
|
|
703 |
Â
|
|
704 |
Â
|
|
705 |
Â
|
|
706 |
AUSTRALIA
|
|
707 |
AU
|
|
708 |
AUS
|
|
709 |
036
|
|
710 |
CTRY_AUSTRALIA
|
|
711 |
61
|
|
712 |
verAustralia
|
|
713 |
15
|
|
714 |
AUSTRIA
|
|
715 |
AT
|
|
716 |
AUT
|
|
717 |
040
|
|
718 |
CTRY_AUSTRIA
|
|
719 |
43
|
|
720 |
verAustria
|
|
721 |
92
|
|
722 |
AZERBAIJAN
|
|
723 |
AZ
|
|
724 |
AZE
|
|
725 |
031
|
|
726 |
CTRY_AZERBAIJAN
|
|
727 |
994
|
|
728 |
Â
|
|
729 |
Â
|
|
730 |
BAHAMAS
|
|
731 |
BS
|
|
732 |
BHS
|
|
733 |
044
|
|
734 |
Â
|
|
735 |
Â
|
|
736 |
Â
|
|
737 |
Â
|
|
738 |
BAHRAIN
|
|
739 |
BH
|
|
740 |
BHR
|
|
741 |
048
|
|
742 |
CTRY_BAHRAIN
|
|
743 |
973
|
|
744 |
Â
|
|
745 |
Â
|
|
746 |
BANGLADESH
|
|
747 |
BD
|
|
748 |
BGD
|
|
749 |
050
|
|
750 |
Â
|
|
751 |
Â
|
|
752 |
verBengali
|
|
753 |
60
|
|
754 |
BARBADOS
|
|
755 |
BB
|
|
756 |
BRB
|
|
757 |
052
|
|
758 |
Â
|
|
759 |
Â
|
|
760 |
Â
|
|
761 |
Â
|
|
762 |
BELARUS
|
|
763 |
BY
|
|
764 |
BLR
|
|
765 |
112
|
|
766 |
CTRY_BELARUS
|
|
767 |
375
|
|
768 |
Â
|
|
769 |
Â
|
|
770 |
BELGIUM
|
|
771 |
BE
|
|
772 |
BEL
|
|
773 |
056
|
|
774 |
CTRY_BELGIUM
|
|
775 |
32
|
|
776 |
verFrBelgium, verFlemish
|
|
777 |
98
|
|
778 |
BELIZE
|
|
779 |
BZ
|
|
780 |
BLZ
|
|
781 |
084
|
|
782 |
CTRY_BELIZE
|
|
783 |
501
|
|
784 |
Â
|
|
785 |
Â
|
|
786 |
BENIN
|
|
787 |
BJ
|
|
788 |
BEN
|
|
789 |
204
|
|
790 |
Â
|
|
791 |
Â
|
|
792 |
Â
|
|
793 |
Â
|
|
794 |
BERMUDA
|
|
795 |
BM
|
|
796 |
BMU
|
|
797 |
060
|
|
798 |
Â
|
|
799 |
Â
|
|
800 |
Â
|
|
801 |
Â
|
|
802 |
BHUTAN
|
|
803 |
BT
|
|
804 |
BTN
|
|
805 |
064
|
|
806 |
Â
|
|
807 |
Â
|
|
808 |
verBhutan
|
|
809 |
83
|
|
810 |
BOLIVIA
|
|
811 |
BO
|
|
812 |
BOL
|
|
813 |
068
|
|
814 |
CTRY_BOLIVIA
|
|
815 |
591
|
|
816 |
Â
|
|
817 |
Â
|
|
818 |
BOSNIA AND HERZEGOVINA
|
|
819 |
BA
|
|
820 |
BIH
|
|
821 |
070
|
|
822 |
Â
|
|
823 |
Â
|
|
824 |
Â
|
|
825 |
Â
|
|
826 |
BOTSWANA
|
|
827 |
BW
|
|
828 |
BWA
|
|
829 |
072
|
|
830 |
Â
|
|
831 |
Â
|
|
832 |
Â
|
|
833 |
Â
|
|
834 |
BOUVET ISLAND
|
|
835 |
BV
|
|
836 |
BVT
|
|
837 |
074
|
|
838 |
Â
|
|
839 |
Â
|
|
840 |
Â
|
|
841 |
Â
|
|
842 |
BRAZIL
|
|
843 |
BR
|
|
844 |
BRA
|
|
845 |
076
|
|
846 |
CTRY_BRAZIL
|
|
847 |
55
|
|
848 |
verBrazil
|
|
849 |
71
|
|
850 |
BRITISH INDIAN OCEAN TERRITORY
|
|
851 |
IO
|
|
852 |
IOT
|
|
853 |
086
|
|
854 |
Â
|
|
855 |
Â
|
|
856 |
Â
|
|
857 |
Â
|
|
858 |
BRUNEI DARUSSALAM
|
|
859 |
BN
|
|
860 |
BRN
|
|
861 |
096
|
|
862 |
CTRY_BRUNEI_DARUSSALAM
|
|
863 |
673
|
|
864 |
Â
|
|
865 |
Â
|
|
866 |
BULGARIA
|
|
867 |
BG
|
|
868 |
BGR
|
|
869 |
100
|
|
870 |
CTRY_BULGARIA
|
|
871 |
359
|
|
872 |
verBulgariaÂ
|
|
873 |
72
|
|
874 |
BURKINA FASO
|
|
875 |
BF
|
|
876 |
BFA
|
|
877 |
854
|
|
878 |
Â
|
|
879 |
Â
|
|
880 |
Â
|
|
881 |
Â
|
|
882 |
BURUNDI
|
|
883 |
BI
|
|
884 |
BDI
|
|
885 |
108
|
|
886 |
Â
|
|
887 |
Â
|
|
888 |
Â
|
|
889 |
Â
|
|
890 |
CAMBODIA
|
|
891 |
KH
|
|
892 |
KHM
|
|
893 |
116
|
|
894 |
Â
|
|
895 |
Â
|
|
896 |
Â
|
|
897 |
Â
|
|
898 |
CAMEROON
|
|
899 |
CM
|
|
900 |
CMR
|
|
901 |
120
|
|
902 |
Â
|
|
903 |
Â
|
|
904 |
Â
|
|
905 |
Â
|
|
906 |
CANADA
|
|
907 |
CA
|
|
908 |
CAN
|
|
909 |
124
|
|
910 |
CTRY_CANADA
|
|
911 |
2
|
|
912 |
verFrCanada, verEndCanada
|
|
913 |
82
|
|
914 |
CAPE VERDE
|
|
915 |
CV
|
|
916 |
CPV
|
|
917 |
132
|
|
918 |
Â
|
|
919 |
Â
|
|
920 |
Â
|
|
921 |
Â
|
|
922 |
CAYMAN ISLANDS
|
|
923 |
KY
|
|
924 |
CYM
|
|
925 |
136
|
|
926 |
Â
|
|
927 |
Â
|
|
928 |
Â
|
|
929 |
Â
|
|
930 |
CENTRAL AFRICAN REPUBLIC
|
|
931 |
CF
|
|
932 |
CAF
|
|
933 |
140
|
|
934 |
Â
|
|
935 |
Â
|
|
936 |
Â
|
|
937 |
Â
|
|
938 |
CHAD
|
|
939 |
TD
|
|
940 |
TCD
|
|
941 |
148
|
|
942 |
Â
|
|
943 |
Â
|
|
944 |
Â
|
|
945 |
Â
|
|
946 |
CHILE
|
|
947 |
CL
|
|
948 |
CHL
|
|
949 |
152
|
|
950 |
CTRY_CHILE
|
|
951 |
56
|
|
952 |
Â
|
|
953 |
Â
|
|
954 |
CHINA
|
|
955 |
CN
|
|
956 |
CHN
|
|
957 |
156
|
|
958 |
CTRY_PRCHINA
|
|
959 |
86
|
|
960 |
verChina
|
|
961 |
52
|
|
962 |
CHRISTMAS ISLAND
|
|
963 |
CX
|
|
964 |
CXR
|
|
965 |
162
|
|
966 |
Â
|
|
967 |
Â
|
|
968 |
Â
|
|
969 |
Â
|
|
970 |
COCOS (KEELING) ISLANDS
|
|
971 |
CC
|
|
972 |
CCK
|
|
973 |
166
|
|
974 |
Â
|
|
975 |
Â
|
|
976 |
Â
|
|
977 |
Â
|
|
978 |
COLOMBIA
|
|
979 |
CO
|
|
980 |
COL
|
|
981 |
170
|
|
982 |
CTRY_COLOMBIA
|
|
983 |
57
|
|
984 |
Â
|
|
985 |
Â
|
|
986 |
COMOROS
|
|
987 |
KM
|
|
988 |
COM
|
|
989 |
174
|
|
990 |
Â
|
|
991 |
Â
|
|
992 |
Â
|
|
993 |
Â
|
|
994 |
CONGO
|
|
995 |
CG
|
|
996 |
COG
|
|
997 |
178
|
|
998 |
Â
|
|
999 |
Â
|
|
1000 |
Â
|
|
1001 |
Â
|
|
1002 |
CONGO, THE DEMOCRATIC REPUBLIC OF THE
|
|
1003 |
CD
|
|
1004 |
||
1005 |
||
1006 |
Â
|
|
1007 |
Â
|
|
1008 |
Â
|
|
1009 |
Â
|
|
1010 |
COOK ISLANDS
|
|
1011 |
CK
|
|
1012 |
COK
|
|
1013 |
184
|
|
1014 |
Â
|
|
1015 |
Â
|
|
1016 |
Â
|
|
1017 |
Â
|
|
1018 |
COSTA RICA
|
|
1019 |
CR
|
|
1020 |
CRI
|
|
1021 |
188
|
|
1022 |
CTRY_COSTA_RICA
|
|
1023 |
506
|
|
1024 |
Â
|
|
1025 |
Â
|
|
1026 |
COTE D''IVOIRE
|
|
1027 |
CI
|
|
1028 |
CIV
|
|
1029 |
384
|
|
1030 |
Â
|
|
1031 |
Â
|
|
1032 |
Â
|
|
1033 |
Â
|
|
1034 |
CROATIA (local name: Hrvatska)
|
|
1035 |
HR
|
|
1036 |
HRV
|
|
1037 |
191
|
|
1038 |
CTRY_CROATIA
|
|
1039 |
385
|
|
1040 |
verCroatia, verYugoCroatian
|
|
1041 |
68 (c), 25 (y)
|
|
1042 |
CUBA
|
|
1043 |
CU
|
|
1044 |
CUB
|
|
1045 |
192
|
|
1046 |
Â
|
|
1047 |
Â
|
|
1048 |
Â
|
|
1049 |
Â
|
|
1050 |
CYPRUS
|
|
1051 |
CY
|
|
1052 |
CYP
|
|
1053 |
196
|
|
1054 |
Â
|
|
1055 |
Â
|
|
1056 |
verCyprus
|
|
1057 |
23
|
|
1058 |
CZECH REPUBLIC
|
|
1059 |
CZ
|
|
1060 |
CZE
|
|
1061 |
203
|
|
1062 |
CTRY_CZECH
|
|
1063 |
420
|
|
1064 |
verCzechÂ
|
|
1065 |
56
|
|
1066 |
DENMARK
|
|
1067 |
DK
|
|
1068 |
DNK
|
|
1069 |
208
|
|
1070 |
CTRY_DENMARK
|
|
1071 |
45
|
|
1072 |
verDenmark(da), verFaeroeIsl(fo)
|
|
1073 |
9(da), 47(fo)
|
|
1074 |
DJIBOUTI
|
|
1075 |
DJ
|
|
1076 |
DJI
|
|
1077 |
262
|
|
1078 |
Â
|
|
1079 |
Â
|
|
1080 |
Â
|
|
1081 |
Â
|
|
1082 |
DOMINICA
|
|
1083 |
DM
|
|
1084 |
DMA
|
|
1085 |
212
|
|
1086 |
Â
|
|
1087 |
Â
|
|
1088 |
Â
|
|
1089 |
Â
|
|
1090 |
DOMINICAN REPUBLIC
|
|
1091 |
DO
|
|
1092 |
DOM
|
|
1093 |
214
|
|
1094 |
CTRY_DOMINICAN_REPUBLIC
|
|
1095 |
1
|
|
1096 |
Â
|
|
1097 |
Â
|
|
1098 |
EAST TIMOR
|
|
1099 |
TL
|
|
1100 |
TLS
|
|
1101 |
626
|
|
1102 |
Â
|
|
1103 |
Â
|
|
1104 |
Â
|
|
1105 |
Â
|
|
1106 |
ECUADOR
|
|
1107 |
EC
|
|
1108 |
ECU
|
|
1109 |
218
|
|
1110 |
CTRY_ECUADOR
|
|
1111 |
593
|
|
1112 |
Â
|
|
1113 |
Â
|
|
1114 |
EGYPT
|
|
1115 |
EG
|
|
1116 |
EGY
|
|
1117 |
818
|
|
1118 |
CTRY_EGYPT
|
|
1119 |
20
|
|
1120 |
verArabic
|
|
1121 |
16
|
|
1122 |
EL SALVADOR
|
|
1123 |
SV
|
|
1124 |
SLV
|
|
1125 |
222
|
|
1126 |
CTRY_EL_SALVADOR
|
|
1127 |
503
|
|
1128 |
Â
|
|
1129 |
Â
|
|
1130 |
EQUATORIAL GUINEA
|
|
1131 |
GQ
|
|
1132 |
GNQ
|
|
1133 |
226
|
|
1134 |
Â
|
|
1135 |
Â
|
|
1136 |
Â
|
|
1137 |
Â
|
|
1138 |
ERITREA
|
|
1139 |
ER
|
|
1140 |
ERI
|
|
1141 |
232
|
|
1142 |
Â
|
|
1143 |
Â
|
|
1144 |
Â
|
|
1145 |
Â
|
|
1146 |
ESTONIA
|
|
1147 |
EE
|
|
1148 |
EST
|
|
1149 |
233
|
|
1150 |
CTRY_ESTONIA
|
|
1151 |
372
|
|
1152 |
verEstonia
|
|
1153 |
44
|
|
1154 |
ETHIOPIA
|
|
1155 |
ET
|
|
1156 |
ETH
|
|
1157 |
210
|
|
1158 |
Â
|
|
1159 |
Â
|
|
1160 |
Â
|
|
1161 |
Â
|
|
1162 |
FALKLAND ISLANDS (MALVINAS)
|
|
1163 |
FK
|
|
1164 |
FLK
|
|
1165 |
238
|
|
1166 |
Â
|
|
1167 |
Â
|
|
1168 |
Â
|
|
1169 |
Â
|
|
1170 |
FAROE ISLANDS
|
|
1171 |
FO
|
|
1172 |
FRO
|
|
1173 |
234
|
|
1174 |
CTRY_FAEROE_ISLANDS
|
|
1175 |
298
|
|
1176 |
Â
|
|
1177 |
Â
|
|
1178 |
FIJI
|
|
1179 |
FJ
|
|
1180 |
FJI
|
|
1181 |
242
|
|
1182 |
Â
|
|
1183 |
Â
|
|
1184 |
Â
|
|
1185 |
Â
|
|
1186 |
FINLAND
|
|
1187 |
FI
|
|
1188 |
FIN
|
|
1189 |
246
|
|
1190 |
CTRY_FINLAND
|
|
1191 |
358
|
|
1192 |
verFinland
|
|
1193 |
17
|
|
1194 |
FRANCE
|
|
1195 |
FR
|
|
1196 |
FRA
|
|
1197 |
250
|
|
1198 |
CTRY_FRANCE
|
|
1199 |
33
|
|
1200 |
verFrance
|
|
1201 |
1
|
|
1202 |
FRANCE, METROPOLITAN
|
|
1203 |
FX
|
|
1204 |
FXX
|
|
1205 |
249
|
|
1206 |
Â
|
|
1207 |
Â
|
|
1208 |
Â
|
|
1209 |
Â
|
|
1210 |
FRENCH GUIANA
|
|
1211 |
GF
|
|
1212 |
GUF
|
|
1213 |
254
|
|
1214 |
Â
|
|
1215 |
Â
|
|
1216 |
Â
|
|
1217 |
Â
|
|
1218 |
FRENCH POLYNESIA
|
|
1219 |
PF
|
|
1220 |
PYF
|
|
1221 |
258
|
|
1222 |
Â
|
|
1223 |
Â
|
|
1224 |
Â
|
|
1225 |
Â
|
|
1226 |
FRENCH SOUTHERN TERRITORIES
|
|
1227 |
TF
|
|
1228 |
ATF
|
|
1229 |
260
|
|
1230 |
Â
|
|
1231 |
Â
|
|
1232 |
Â
|
|
1233 |
Â
|
|
1234 |
GABON
|
|
1235 |
GA
|
|
1236 |
GAB
|
|
1237 |
266
|
|
1238 |
Â
|
|
1239 |
Â
|
|
1240 |
Â
|
|
1241 |
Â
|
|
1242 |
GAMBIA
|
|
1243 |
GM
|
|
1244 |
GMB
|
|
1245 |
270
|
|
1246 |
Â
|
|
1247 |
Â
|
|
1248 |
Â
|
|
1249 |
Â
|
|
1250 |
GEORGIA
|
|
1251 |
GE
|
|
1252 |
GEO
|
|
1253 |
268
|
|
1254 |
CTRY_GEORGIA
|
|
1255 |
995
|
|
1256 |
verGeorgian
|
|
1257 |
85
|
|
1258 |
GERMANY
|
|
1259 |
DE
|
|
1260 |
DEU
|
|
1261 |
276
|
|
1262 |
CTRY_GERMANY
|
|
1263 |
49
|
|
1264 |
verGermany
|
|
1265 |
3
|
|
1266 |
GHANA
|
|
1267 |
GH
|
|
1268 |
GHA
|
|
1269 |
288
|
|
1270 |
Â
|
|
1271 |
Â
|
|
1272 |
Â
|
|
1273 |
Â
|
|
1274 |
GIBRALTAR
|
|
1275 |
GI
|
|
1276 |
GIB
|
|
1277 |
292
|
|
1278 |
Â
|
|
1279 |
Â
|
|
1280 |
Â
|
|
1281 |
Â
|
|
1282 |
GREECE
|
|
1283 |
GR
|
|
1284 |
GRC
|
|
1285 |
300
|
|
1286 |
CTRY_GREECE
|
|
1287 |
30
|
|
1288 |
verGreece, verGreecePoly
|
|
1289 |
20, 40
|
|
1290 |
GREENLAND
|
|
1291 |
GL
|
|
1292 |
GRL
|
|
1293 |
304
|
|
1294 |
Â
|
|
1295 |
Â
|
|
1296 |
verGreenland
|
|
1297 |
107
|
|
1298 |
GRENADA
|
|
1299 |
GD
|
|
1300 |
GRD
|
|
1301 |
308
|
|
1302 |
Â
|
|
1303 |
Â
|
|
1304 |
Â
|
|
1305 |
Â
|
|
1306 |
GUADELOUPE
|
|
1307 |
GP
|
|
1308 |
GLP
|
|
1309 |
312
|
|
1310 |
Â
|
|
1311 |
Â
|
|
1312 |
Â
|
|
1313 |
Â
|
|
1314 |
GUAM
|
|
1315 |
GU
|
|
1316 |
GUM
|
|
1317 |
316
|
|
1318 |
Â
|
|
1319 |
Â
|
|
1320 |
Â
|
|
1321 |
Â
|
|
1322 |
GUATEMALA
|
|
1323 |
GT
|
|
1324 |
GTM
|
|
1325 |
320
|
|
1326 |
CTRY_GUATEMALA
|
|
1327 |
502
|
|
1328 |
Â
|
|
1329 |
Â
|
|
1330 |
GUINEA
|
|
1331 |
GN
|
|
1332 |
GIN
|
|
1333 |
324
|
|
1334 |
Â
|
|
1335 |
Â
|
|
1336 |
Â
|
|
1337 |
Â
|
|
1338 |
GUINEA-BISSAU
|
|
1339 |
GW
|
|
1340 |
GNB
|
|
1341 |
624
|
|
1342 |
Â
|
|
1343 |
Â
|
|
1344 |
Â
|
|
1345 |
Â
|
|
1346 |
GUYANA
|
|
1347 |
GY
|
|
1348 |
GUY
|
|
1349 |
328
|
|
1350 |
Â
|
|
1351 |
Â
|
|
1352 |
Â
|
|
1353 |
Â
|
|
1354 |
HAITI
|
|
1355 |
HT
|
|
1356 |
HTI
|
|
1357 |
332
|
|
1358 |
Â
|
|
1359 |
Â
|
|
1360 |
Â
|
|
1361 |
Â
|
|
1362 |
HEARD ISLAND & MCDONALD ISLANDS
|
|
1363 |
HM
|
|
1364 |
HMD
|
|
1365 |
334
|
|
1366 |
Â
|
|
1367 |
Â
|
|
1368 |
Â
|
|
1369 |
Â
|
|
1370 |
HONDURAS
|
|
1371 |
HN
|
|
1372 |
HND
|
|
1373 |
340
|
|
1374 |
CTRY_HONDURAS
|
|
1375 |
504
|
|
1376 |
Â
|
|
1377 |
Â
|
|
1378 |
HONG KONG
|
|
1379 |
HK
|
|
1380 |
HKG
|
|
1381 |
344
|
|
1382 |
CTRY_HONG_KONG
|
|
1383 |
852
|
|
1384 |
Â
|
|
1385 |
Â
|
|
1386 |
HUNGARY
|
|
1387 |
HU
|
|
1388 |
HUN
|
|
1389 |
348
|
|
1390 |
CTRY_HUNGARY
|
|
1391 |
36
|
|
1392 |
verHungary
|
|
1393 |
43
|
|
1394 |
ICELAND
|
|
1395 |
IS
|
|
1396 |
ISL
|
|
1397 |
352
|
|
1398 |
CTRY_ICELAND
|
|
1399 |
354
|
|
1400 |
verIceland
|
|
1401 |
21
|
|
1402 |
INDIA
|
|
1403 |
IN
|
|
1404 |
IND
|
|
1405 |
356
|
|
1406 |
CTRY_INDIA
|
|
1407 |
91
|
|
1408 |
verIndiaHindi(hi)
|
|
1409 |
33
|
|
1410 |
INDONESIA
|
|
1411 |
ID
|
|
1412 |
IDN
|
|
1413 |
360
|
|
1414 |
CTRY_INDONESIA
|
|
1415 |
62
|
|
1416 |
Â
|
|
1417 |
Â
|
|
1418 |
IRAN, ISLAMIC REPUBLIC OF
|
|
1419 |
IR
|
|
1420 |
IRN
|
|
1421 |
364
|
|
1422 |
CTRY_IRAN
|
|
1423 |
981
|
|
1424 |
verIran
|
|
1425 |
48
|
|
1426 |
IRAQ
|
|
1427 |
IQ
|
|
1428 |
IRQ
|
|
1429 |
368
|
|
1430 |
CTRY_IRAQ
|
|
1431 |
964
|
|
1432 |
verArabic
|
|
1433 |
16
|
|
1434 |
IRELAND
|
|
1435 |
IE
|
|
1436 |
IRL
|
|
1437 |
372
|
|
1438 |
CTRY_IRELAND
|
|
1439 |
353
|
|
1440 |
verIreland
|
|
1441 |
50
|
|
1442 |
ISRAEL
|
|
1443 |
IL
|
|
1444 |
ISR
|
|
1445 |
376
|
|
1446 |
CTRY_ISRAEL
|
|
1447 |
972
|
|
1448 |
verIsrael
|
|
1449 |
13
|
|
1450 |
ITALY
|
|
1451 |
IT
|
|
1452 |
ITA
|
|
1453 |
380
|
|
1454 |
CTRY_ITALY
|
|
1455 |
39
|
|
1456 |
verItaly
|
|
1457 |
4
|
|
1458 |
JAMAICA
|
|
1459 |
JM
|
|
1460 |
JAM
|
|
1461 |
388
|
|
1462 |
CTRY_JAMAICA
|
|
1463 |
1
|
|
1464 |
Â
|
|
1465 |
Â
|
|
1466 |
JAPAN
|
|
1467 |
JP
|
|
1468 |
JPN
|
|
1469 |
392
|
|
1470 |
CTRY_JAPAN
|
|
1471 |
81
|
|
1472 |
verJapan
|
|
1473 |
14
|
|
1474 |
JORDAN
|
|
1475 |
JO
|
|
1476 |
JOR
|
|
1477 |
400
|
|
1478 |
CTRY_JORDAN
|
|
1479 |
962
|
|
1480 |
Â
|
|
1481 |
Â
|
|
1482 |
KAZAKHSTAN
|
|
1483 |
KZ
|
|
1484 |
KAZ
|
|
1485 |
398
|
|
1486 |
CTRY_KAZAKSTAN
|
|
1487 |
7
|
|
1488 |
Â
|
|
1489 |
Â
|
|
1490 |
KENYA
|
|
1491 |
KE
|
|
1492 |
KEN
|
|
1493 |
404
|
|
1494 |
CTRY_KENYA
|
|
1495 |
254
|
|
1496 |
Â
|
|
1497 |
Â
|
|
1498 |
KIRIBATI
|
|
1499 |
KI
|
|
1500 |
KIR
|
|
1501 |
296
|
|
1502 |
Â
|
|
1503 |
Â
|
|
1504 |
Â
|
|
1505 |
Â
|
|
1506 |
KOREA, DEMOCRATIC PEOPLE''S REPUBLIC OF
|
|
1507 |
KP
|
|
1508 |
PRK
|
|
1509 |
408
|
|
1510 |
Â
|
|
1511 |
Â
|
|
1512 |
verKorea
|
|
1513 |
51
|
|
1514 |
KOREA, REPUBLIC OF
|
|
1515 |
KR
|
|
1516 |
KOR
|
|
1517 |
410
|
|
1518 |
CTRY_SOUTH_KOREA
|
|
1519 |
82
|
|
1520 |
verKorea
|
|
1521 |
Â
|
|
1522 |
KUWAIT
|
|
1523 |
KW
|
|
1524 |
KWT
|
|
1525 |
414
|
|
1526 |
CTRY_KUWAIT
|
|
1527 |
965
|
|
1528 |
Â
|
|
1529 |
Â
|
|
1530 |
KYRGYZSTAN
|
|
1531 |
KG
|
|
1532 |
KGZ
|
|
1533 |
417
|
|
1534 |
CTRY_KYRGYZSTAN
|
|
1535 |
996
|
|
1536 |
Â
|
|
1537 |
Â
|
|
1538 |
LAO PEOPLE''S DEMOCRATIC REPUBLIC
|
|
1539 |
LA
|
|
1540 |
LAO
|
|
1541 |
418
|
|
1542 |
Â
|
|
1543 |
Â
|
|
1544 |
Â
|
|
1545 |
Â
|
|
1546 |
LATVIA
|
|
1547 |
LV
|
|
1548 |
LVA
|
|
1549 |
428
|
|
1550 |
CTRY_LATVIA
|
|
1551 |
371
|
|
1552 |
verLatvia
|
|
1553 |
45
|
|
1554 |
LEBANON
|
|
1555 |
LB
|
|
1556 |
LBN
|
|
1557 |
422
|
|
1558 |
CTRY_LEBANON
|
|
1559 |
961
|
|
1560 |
Â
|
|
1561 |
Â
|
|
1562 |
LESOTHO
|
|
1563 |
LS
|
|
1564 |
LSO
|
|
1565 |
426
|
|
1566 |
Â
|
|
1567 |
Â
|
|
1568 |
Â
|
|
1569 |
Â
|
|
1570 |
LIBERIA
|
|
1571 |
LR
|
|
1572 |
LBR
|
|
1573 |
430
|
|
1574 |
Â
|
|
1575 |
Â
|
|
1576 |
Â
|
|
1577 |
Â
|
|
1578 |
LIBYAN ARAB JAMAHIRIYA
|
|
1579 |
LY
|
|
1580 |
LBY
|
|
1581 |
434
|
|
1582 |
CTRY_LIBYA
|
|
1583 |
218
|
|
1584 |
verArabic
|
|
1585 |
16
|
|
1586 |
LIECHTENSTEIN
|
|
1587 |
LI
|
|
1588 |
LIE
|
|
1589 |
438
|
|
1590 |
CTRY_LIECHTENSTEIN
|
|
1591 |
41
|
|
1592 |
Â
|
|
1593 |
Â
|
|
1594 |
LITHUANIA
|
|
1595 |
LT
|
|
1596 |
LTU
|
|
1597 |
440
|
|
1598 |
CTRY_LITHUANIA
|
|
1599 |
370
|
|
1600 |
verLithuania
|
|
1601 |
41
|
|
1602 |
LUXEMBOURG
|
|
1603 |
LU
|
|
1604 |
LUX
|
|
1605 |
442
|
|
1606 |
CTRY_LUXEMBOURG
|
|
1607 |
352
|
|
1608 |
verFrBelgiumLux
|
|
1609 |
6
|
|
1610 |
MACAU
|
|
1611 |
MO
|
|
1612 |
MAC
|
|
1613 |
446
|
|
1614 |
CTRY_MACAU
|
|
1615 |
853
|
|
1616 |
Â
|
|
1617 |
Â
|
|
1618 |
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF
|
|
1619 |
MK
|
|
1620 |
MKD
|
|
1621 |
807
|
|
1622 |
CTRY_MACEDONIA
|
|
1623 |
389
|
|
1624 |
verMacedonian
|
|
1625 |
Â
|
|
1626 |
MADAGASCAR
|
|
1627 |
MG
|
|
1628 |
MDG
|
|
1629 |
450
|
|
1630 |
Â
|
|
1631 |
Â
|
|
1632 |
Â
|
|
1633 |
Â
|
|
1634 |
MALAWI
|
|
1635 |
MW
|
|
1636 |
MWI
|
|
1637 |
454
|
|
1638 |
Â
|
|
1639 |
Â
|
|
1640 |
Â
|
|
1641 |
Â
|
|
1642 |
MALAYSIA
|
|
1643 |
MY
|
|
1644 |
MYS
|
|
1645 |
458
|
|
1646 |
CTRY_MALAYSIA
|
|
1647 |
60
|
|
1648 |
Â
|
|
1649 |
Â
|
|
1650 |
MALDIVES
|
|
1651 |
MV
|
|
1652 |
MDV
|
|
1653 |
462
|
|
1654 |
CTRY_MALDIVES
|
|
1655 |
960
|
|
1656 |
Â
|
|
1657 |
Â
|
|
1658 |
MALI
|
|
1659 |
ML
|
|
1660 |
MLI
|
|
1661 |
466
|
|
1662 |
Â
|
|
1663 |
Â
|
|
1664 |
Â
|
|
1665 |
Â
|
|
1666 |
MALTA
|
|
1667 |
MT
|
|
1668 |
MLT
|
|
1669 |
470
|
|
1670 |
Â
|
|
1671 |
Â
|
|
1672 |
verMalta
|
|
1673 |
22
|
|
1674 |
MARSHALL ISLANDS
|
|
1675 |
MH
|
|
1676 |
MHL
|
|
1677 |
584
|
|
1678 |
Â
|
|
1679 |
Â
|
|
1680 |
Â
|
|
1681 |
Â
|
|
1682 |
MARTINIQUE
|
|
1683 |
MQ
|
|
1684 |
MTQ
|
|
1685 |
474
|
|
1686 |
Â
|
|
1687 |
Â
|
|
1688 |
Â
|
|
1689 |
Â
|
|
1690 |
MAURITANIA
|
|
1691 |
MR
|
|
1692 |
MRT
|
|
1693 |
478
|
|
1694 |
Â
|
|
1695 |
Â
|
|
1696 |
Â
|
|
1697 |
Â
|
|
1698 |
MAURITIUS
|
|
1699 |
MU
|
|
1700 |
MUS
|
|
1701 |
480
|
|
1702 |
Â
|
|
1703 |
Â
|
|
1704 |
Â
|
|
1705 |
Â
|
|
1706 |
MAYOTTE
|
|
1707 |
YT
|
|
1708 |
MYT
|
|
1709 |
175
|
|
1710 |
Â
|
|
1711 |
Â
|
|
1712 |
Â
|
|
1713 |
Â
|
|
1714 |
MEXICO
|
|
1715 |
MX
|
|
1716 |
MEX
|
|
1717 |
484
|
|
1718 |
CTRY_MEXICO
|
|
1719 |
52
|
|
1720 |
Â
|
|
1721 |
Â
|
|
1722 |
MICRONESIA, FEDERATED STATES OF
|
|
1723 |
FM
|
|
1724 |
FSM
|
|
1725 |
583
|
|
1726 |
Â
|
|
1727 |
Â
|
|
1728 |
Â
|
|
1729 |
Â
|
|
1730 |
MOLDOVA, REPUBLIC OF
|
|
1731 |
MD
|
|
1732 |
MDA
|
|
1733 |
498
|
|
1734 |
Â
|
|
1735 |
Â
|
|
1736 |
Â
|
|
1737 |
Â
|
|
1738 |
MONACO
|
|
1739 |
MC
|
|
1740 |
MCO
|
|
1741 |
492
|
|
1742 |
CTRY_MONACO
|
|
1743 |
33
|
|
1744 |
Â
|
|
1745 |
Â
|
|
1746 |
MONGOLIA
|
|
1747 |
MN
|
|
1748 |
MNG
|
|
1749 |
496
|
|
1750 |
CTRY_MONGOLIA
|
|
1751 |
976
|
|
1752 |
Â
|
|
1753 |
Â
|
|
1754 |
MONTSERRAT
|
|
1755 |
MS
|
|
1756 |
MSR
|
|
1757 |
500
|
|
1758 |
Â
|
|
1759 |
Â
|
|
1760 |
Â
|
|
1761 |
Â
|
|
1762 |
MOROCCO
|
|
1763 |
MA
|
|
1764 |
MAR
|
|
1765 |
504
|
|
1766 |
CTRY_MOROCCO
|
|
1767 |
212
|
|
1768 |
verArabic
|
|
1769 |
16
|
|
1770 |
MOZAMBIQUE
|
|
1771 |
MZ
|
|
1772 |
MOZ
|
|
1773 |
508
|
|
1774 |
Â
|
|
1775 |
Â
|
|
1776 |
Â
|
|
1777 |
Â
|
|
1778 |
MYANMAR
|
|
1779 |
MM
|
|
1780 |
MMR
|
|
1781 |
104
|
|
1782 |
Â
|
|
1783 |
Â
|
|
1784 |
Â
|
|
1785 |
Â
|
|
1786 |
NAMIBIA
|
|
1787 |
NA
|
|
1788 |
NAM
|
|
1789 |
516
|
|
1790 |
Â
|
|
1791 |
Â
|
|
1792 |
Â
|
|
1793 |
Â
|
|
1794 |
NAURU
|
|
1795 |
NR
|
|
1796 |
NRU
|
|
1797 |
520
|
|
1798 |
Â
|
|
1799 |
Â
|
|
1800 |
Â
|
|
1801 |
Â
|
|
1802 |
NEPAL
|
|
1803 |
NP
|
|
1804 |
NPL
|
|
1805 |
524
|
|
1806 |
Â
|
|
1807 |
Â
|
|
1808 |
verNepal
|
|
1809 |
106
|
|
1810 |
NETHERLANDS
|
|
1811 |
NL
|
|
1812 |
NLD
|
|
1813 |
528
|
|
1814 |
CTRY_NETHERLANDS
|
|
1815 |
31
|
|
1816 |
verNetherlands
|
|
1817 |
5
|
|
1818 |
NETHERLANDS ANTILLES
|
|
1819 |
AN
|
|
1820 |
ANT
|
|
1821 |
530
|
|
1822 |
Â
|
|
1823 |
Â
|
|
1824 |
Â
|
|
1825 |
Â
|
|
1826 |
NEW CALEDONIA
|
|
1827 |
NC
|
|
1828 |
NCL
|
|
1829 |
540
|
|
1830 |
Â
|
|
1831 |
Â
|
|
1832 |
Â
|
|
1833 |
Â
|
|
1834 |
NEW ZEALAND
|
|
1835 |
NZ
|
|
1836 |
NZL
|
|
1837 |
554
|
|
1838 |
CTRY_NEW_ZEALAND
|
|
1839 |
64
|
|
1840 |
Â
|
|
1841 |
Â
|
|
1842 |
NICARAGUA
|
|
1843 |
NI
|
|
1844 |
NIC
|
|
1845 |
558
|
|
1846 |
CTRY_NICARAGUA
|
|
1847 |
505
|
|
1848 |
Â
|
|
1849 |
Â
|
|
1850 |
NIGER
|
|
1851 |
NE
|
|
1852 |
NER
|
|
1853 |
562
|
|
1854 |
Â
|
|
1855 |
Â
|
|
1856 |
Â
|
|
1857 |
Â
|
|
1858 |
NIGERIA
|
|
1859 |
NG
|
|
1860 |
NGA
|
|
1861 |
566
|
|
1862 |
Â
|
|
1863 |
Â
|
|
1864 |
Â
|
|
1865 |
Â
|
|
1866 |
NIUE
|
|
1867 |
NU
|
|
1868 |
NIU
|
|
1869 |
570
|
|
1870 |
Â
|
|
1871 |
Â
|
|
1872 |
Â
|
|
1873 |
Â
|
|
1874 |
NORFOLK ISLAND
|
|
1875 |
NF
|
|
1876 |
NFK
|
|
1877 |
574
|
|
1878 |
Â
|
|
1879 |
Â
|
|
1880 |
Â
|
|
1881 |
Â
|
|
1882 |
NORTHERN MARIANA ISLANDS
|
|
1883 |
MP
|
|
1884 |
MNP
|
|
1885 |
580
|
|
1886 |
Â
|
|
1887 |
Â
|
|
1888 |
Â
|
|
1889 |
Â
|
|
1890 |
NORWAY
|
|
1891 |
NO
|
|
1892 |
NOR
|
|
1893 |
578
|
|
1894 |
CTRY_NORWAY
|
|
1895 |
47
|
|
1896 |
verNorway
|
|
1897 |
12
|
|
1898 |
OMAN
|
|
1899 |
OM
|
|
1900 |
OMN
|
|
1901 |
512
|
|
1902 |
CTRY_OMAN
|
|
1903 |
968
|
|
1904 |
Â
|
|
1905 |
Â
|
|
1906 |
PAKISTAN
|
|
1907 |
PK
|
|
1908 |
PAK
|
|
1909 |
586
|
|
1910 |
CTRY_PAKISTAN
|
|
1911 |
92
|
|
1912 |
verPakistanUrdu, verPunjabi
|
|
1913 |
34 (U), 95 (P)
|
|
1914 |
PALAU
|
|
1915 |
PW
|
|
1916 |
PLW
|
|
1917 |
585
|
|
1918 |
Â
|
|
1919 |
Â
|
|
1920 |
Â
|
|
1921 |
Â
|
|
1922 |
PANAMA
|
|
1923 |
PA
|
|
1924 |
PAN
|
|
1925 |
591
|
|
1926 |
CTRY_PANAMA
|
|
1927 |
507
|
|
1928 |
Â
|
|
1929 |
Â
|
|
1930 |
PALESTINIAN TERRITORY, OCCUPIED
|
|
1931 |
PS
|
|
1932 |
||
1933 |
||
1934 |
||
1935 |
||
1936 |
Â
|
|
1937 |
Â
|
|
1938 |
PAPUA NEW GUINEA
|
|
1939 |
PG
|
|
1940 |
PNG
|
|
1941 |
598
|
|
1942 |
Â
|
|
1943 |
Â
|
|
1944 |
Â
|
|
1945 |
Â
|
|
1946 |
PARAGUAY
|
|
1947 |
PY
|
|
1948 |
PRY
|
|
1949 |
600
|
|
1950 |
CTRY_PARAGUAY
|
|
1951 |
595
|
|
1952 |
Â
|
|
1953 |
Â
|
|
1954 |
PERU
|
|
1955 |
PE
|
|
1956 |
PER
|
|
1957 |
604
|
|
1958 |
CTRY_PERU
|
|
1959 |
51
|
|
1960 |
Â
|
|
1961 |
Â
|
|
1962 |
PHILIPPINES
|
|
1963 |
PH
|
|
1964 |
PHL
|
|
1965 |
608
|
|
1966 |
CTRY_PHILIPPINES
|
|
1967 |
63
|
|
1968 |
Â
|
|
1969 |
Â
|
|
1970 |
PITCAIRN
|
|
1971 |
PN
|
|
1972 |
PCN
|
|
1973 |
612
|
|
1974 |
Â
|
|
1975 |
Â
|
|
1976 |
Â
|
|
1977 |
Â
|
|
1978 |
POLAND
|
|
1979 |
PL
|
|
1980 |
POL
|
|
1981 |
616
|
|
1982 |
CTRY_POLAND
|
|
1983 |
48
|
|
1984 |
verPoland
|
|
1985 |
42
|
|
1986 |
PORTUGAL
|
|
1987 |
PT
|
|
1988 |
PRT
|
|
1989 |
620
|
|
1990 |
CTRY_PORTUGAL
|
|
1991 |
351
|
|
1992 |
verPortugal
|
|
1993 |
10
|
|
1994 |
PUERTO RICO
|
|
1995 |
PR
|
|
1996 |
PRI
|
|
1997 |
630
|
|
1998 |
CTRY_PUERTO_RICO
|
|
1999 |
1
|
|
2000 |
Â
|
|
2001 |
Â
|
|
2002 |
QATAR
|
|
2003 |
QA
|
|
2004 |
QAT
|
|
2005 |
634
|
|
2006 |
CTRY_QATAR
|
|
2007 |
974
|
|
2008 |
Â
|
|
2009 |
Â
|
|
2010 |
REUNION
|
|
2011 |
RE
|
|
2012 |
REU
|
|
2013 |
638
|
|
2014 |
Â
|
|
2015 |
Â
|
|
2016 |
Â
|
|
2017 |
Â
|
|
2018 |
ROMANIA
|
|
2019 |
RO
|
|
2020 |
ROU*
|
|
2021 |
642
|
|
2022 |
CTRY_ROMANIA
|
|
2023 |
40
|
|
2024 |
verRomania
|
|
2025 |
39
|
|
2026 |
RUSSIAN FEDERATION
|
|
2027 |
RU
|
|
2028 |
RUS
|
|
2029 |
643
|
|
2030 |
CTRY_RUSSIA
|
|
2031 |
7
|
|
2032 |
verRussia
|
|
2033 |
49
|
|
2034 |
RWANDA
|
|
2035 |
RW
|
|
2036 |
RWA
|
|
2037 |
646
|
|
2038 |
Â
|
|
2039 |
Â
|
|
2040 |
Â
|
|
2041 |
Â
|
|
2042 |
SAINT KITTS AND NEVIS
|
|
2043 |
KN
|
|
2044 |
KNA
|
|
2045 |
659
|
|
2046 |
Â
|
|
2047 |
Â
|
|
2048 |
Â
|
|
2049 |
Â
|
|
2050 |
SAINT LUCIA
|
|
2051 |
LC
|
|
2052 |
LCA
|
|
2053 |
662
|
|
2054 |
Â
|
|
2055 |
Â
|
|
2056 |
Â
|
|
2057 |
Â
|
|
2058 |
SAINT VINCENT AND THE GRENADINES
|
|
2059 |
VC
|
|
2060 |
VCT
|
|
2061 |
670
|
|
2062 |
Â
|
|
2063 |
Â
|
|
2064 |
Â
|
|
2065 |
Â
|
|
2066 |
SAMOA
|
|
2067 |
WS
|
|
2068 |
WSM
|
|
2069 |
882
|
|
2070 |
Â
|
|
2071 |
Â
|
|
2072 |
Â
|
|
2073 |
Â
|
|
2074 |
SAN MARINO
|
|
2075 |
SM
|
|
2076 |
SMR
|
|
2077 |
674
|
|
2078 |
Â
|
|
2079 |
Â
|
|
2080 |
Â
|
|
2081 |
Â
|
|
2082 |
SAO TOME AND PRINCIPE
|
|
2083 |
ST
|
|
2084 |
STP
|
|
2085 |
678
|
|
2086 |
Â
|
|
2087 |
Â
|
|
2088 |
Â
|
|
2089 |
Â
|
|
2090 |
SAUDI ARABIA
|
|
2091 |
SA
|
|
2092 |
SAU
|
|
2093 |
682
|
|
2094 |
CTRY_SAUDI_ARABIA
|
|
2095 |
966
|
|
2096 |
verArabic
|
|
2097 |
16
|
|
2098 |
SENEGAL
|
|
2099 |
SN
|
|
2100 |
SEN
|
|
2101 |
686
|
|
2102 |
Â
|
|
2103 |
Â
|
|
2104 |
Â
|
|
2105 |
Â
|
|
2106 |
SERBIA AND MONTENEGRO
|
|
2107 |
CS
|
|
2108 |
Â
|
|
2109 |
Â
|
|
2110 |
CTRY_SERBIA
|
|
2111 |
381
|
|
2112 |
Â
|
|
2113 |
Â
|
|
2114 |
SEYCHELLES
|
|
2115 |
SC
|
|
2116 |
SYC
|
|
2117 |
690
|
|
2118 |
Â
|
|
2119 |
Â
|
|
2120 |
Â
|
|
2121 |
Â
|
|
2122 |
SIERRA LEONE
|
|
2123 |
SL
|
|
2124 |
SLE
|
|
2125 |
694
|
|
2126 |
Â
|
|
2127 |
Â
|
|
2128 |
Â
|
|
2129 |
Â
|
|
2130 |
SINGAPORE
|
|
2131 |
SG
|
|
2132 |
SGP
|
|
2133 |
702
|
|
2134 |
CTRY_SINGAPORE
|
|
2135 |
65
|
|
2136 |
verSingapore
|
|
2137 |
100
|
|
2138 |
SLOVAKIA (Slovak Republic)
|
|
2139 |
SK
|
|
2140 |
SVK
|
|
2141 |
703
|
|
2142 |
CTRY_SLOVAK
|
|
2143 |
421
|
|
2144 |
verSlovak
|
|
2145 |
57Â
|
|
2146 |
SLOVENIA
|
|
2147 |
SI
|
|
2148 |
SVN
|
|
2149 |
705
|
|
2150 |
CTRY_SLOVENIA
|
|
2151 |
386
|
|
2152 |
verSlovenian
|
|
2153 |
66
|
|
2154 |
SOLOMON ISLANDS
|
|
2155 |
SB
|
|
2156 |
SLB
|
|
2157 |
90
|
|
2158 |
Â
|
|
2159 |
Â
|
|
2160 |
Â
|
|
2161 |
Â
|
|
2162 |
SOMALIA
|
|
2163 |
SO
|
|
2164 |
SOM
|
|
2165 |
706
|
|
2166 |
Â
|
|
2167 |
Â
|
|
2168 |
Â
|
|
2169 |
Â
|
|
2170 |
SOUTH AFRICA
|
|
2171 |
ZA
|
|
2172 |
ZAF
|
|
2173 |
710
|
|
2174 |
CTRY_SOUTH_AFRICA
|
|
2175 |
27
|
|
2176 |
Â
|
|
2177 |
Â
|
|
2178 |
SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
|
|
2179 |
GS
|
|
2180 |
||
2181 |
||
2182 |
||
2183 |
||
2184 |
Â
|
|
2185 |
Â
|
|
2186 |
SPAIN
|
|
2187 |
ES
|
|
2188 |
ESP
|
|
2189 |
724
|
|
2190 |
CTRY_SPAIN
|
|
2191 |
34
|
|
2192 |
verSpain
|
|
2193 |
8
|
|
2194 |
SRI LANKA
|
|
2195 |
LK
|
|
2196 |
LKA
|
|
2197 |
144
|
|
2198 |
Â
|
|
2199 |
Â
|
|
2200 |
Â
|
|
2201 |
Â
|
|
2202 |
SAINT HELENA
|
|
2203 |
SH
|
|
2204 |
SHN
|
|
2205 |
654
|
|
2206 |
Â
|
|
2207 |
Â
|
|
2208 |
Â
|
|
2209 |
Â
|
|
2210 |
SAINT PIERRE AND MIQUELON
|
|
2211 |
PM
|
|
2212 |
SPM
|
|
2213 |
666
|
|
2214 |
Â
|
|
2215 |
Â
|
|
2216 |
Â
|
|
2217 |
Â
|
|
2218 |
SUDAN
|
|
2219 |
SD
|
|
2220 |
SDN
|
|
2221 |
736
|
|
2222 |
Â
|
|
2223 |
Â
|
|
2224 |
Â
|
|
2225 |
Â
|
|
2226 |
SURINAME
|
|
2227 |
SR
|
|
2228 |
SUR
|
|
2229 |
740
|
|
2230 |
Â
|
|
2231 |
Â
|
|
2232 |
Â
|
|
2233 |
Â
|
|
2234 |
SVALBARD AND JAN MAYEN ISLANDS
|
|
2235 |
SJ
|
|
2236 |
SJM
|
|
2237 |
744
|
|
2238 |
Â
|
|
2239 |
Â
|
|
2240 |
Â
|
|
2241 |
Â
|
|
2242 |
SWAZILAND
|
|
2243 |
SZ
|
|
2244 |
SWZ
|
|
2245 |
748
|
|
2246 |
Â
|
|
2247 |
Â
|
|
2248 |
Â
|
|
2249 |
Â
|
|
2250 |
SWEDEN
|
|
2251 |
SE
|
|
2252 |
SWE
|
|
2253 |
752
|
|
2254 |
CTRY_SWEDEN
|
|
2255 |
46
|
|
2256 |
verSweden
|
|
2257 |
7
|
|
2258 |
SWITZERLAND
|
|
2259 |
CH
|
|
2260 |
CHE
|
|
2261 |
756
|
|
2262 |
CTRY_SWITZERLAND
|
|
2263 |
41
|
|
2264 |
verFrSwiss(fr), verGrSwiss(de)
|
|
2265 |
18(fr), 19(de)
|
|
2266 |
SYRIAN ARAB REPUBLIC
|
|
2267 |
SY
|
|
2268 |
SYR
|
|
2269 |
760
|
|
2270 |
CTRY_SYRIA
|
|
2271 |
963
|
|
2272 |
Â
|
|
2273 |
Â
|
|
2274 |
TAIWAN, PROVINCE OF CHINA
|
|
2275 |
TW
|
|
2276 |
TWN
|
|
2277 |
158
|
|
2278 |
CTRY_TAIWAN
|
|
2279 |
886
|
|
2280 |
verTaiwan
|
|
2281 |
53
|
|
2282 |
TAJIKISTAN
|
|
2283 |
TJ
|
|
2284 |
TJK
|
|
2285 |
762
|
|
2286 |
Â
|
|
2287 |
Â
|
|
2288 |
Â
|
|
2289 |
Â
|
|
2290 |
TANZANIA, UNITED REPUBLIC OF
|
|
2291 |
TZ
|
|
2292 |
TZA
|
|
2293 |
834
|
|
2294 |
Â
|
|
2295 |
Â
|
|
2296 |
Â
|
|
2297 |
Â
|
|
2298 |
TATARSTAN
|
|
2299 |
||
2300 |
||
2301 |
Â
|
|
2302 |
CTRY_TATARSTAN
|
|
2303 |
7
|
|
2304 |
Â
|
|
2305 |
Â
|
|
2306 |
THAILAND
|
|
2307 |
TH
|
|
2308 |
THA
|
|
2309 |
764
|
|
2310 |
CTRY_THAILAND
|
|
2311 |
66
|
|
2312 |
verThailand
|
|
2313 |
54
|
|
2314 |
TIMOR-LESTE
|
|
2315 |
TL
|
|
2316 |
||
2317 |
||
2318 |
Â
|
|
2319 |
Â
|
|
2320 |
Â
|
|
2321 |
Â
|
|
2322 |
TOGO
|
|
2323 |
TG
|
|
2324 |
TGO
|
|
2325 |
768
|
|
2326 |
Â
|
|
2327 |
Â
|
|
2328 |
Â
|
|
2329 |
Â
|
|
2330 |
TOKELAU
|
|
2331 |
TK
|
|
2332 |
TKL
|
|
2333 |
772
|
|
2334 |
Â
|
|
2335 |
Â
|
|
2336 |
Â
|
|
2337 |
Â
|
|
2338 |
TONGA
|
|
2339 |
TO
|
|
2340 |
TON
|
|
2341 |
776
|
|
2342 |
Â
|
|
2343 |
Â
|
|
2344 |
verTonga
|
|
2345 |
88
|
|
2346 |
TRINIDAD AND TOBAGO
|
|
2347 |
TT
|
|
2348 |
TTO
|
|
2349 |
780
|
|
2350 |
CTRY_TRINIDAD_Y_TOBAGO
|
|
2351 |
1
|
|
2352 |
Â
|
|
2353 |
Â
|
|
2354 |
TUNISIA
|
|
2355 |
TN
|
|
2356 |
TUN
|
|
2357 |
788
|
|
2358 |
CTRY_TUNISIA
|
|
2359 |
216
|
|
2360 |
verArabic
|
|
2361 |
16
|
|
2362 |
TURKEY
|
|
2363 |
TR
|
|
2364 |
TUR
|
|
2365 |
792
|
|
2366 |
CTRY_TURKEY
|
|
2367 |
90
|
|
2368 |
verTurkey
|
|
2369 |
24
|
|
2370 |
TURKMENISTAN
|
|
2371 |
TM
|
|
2372 |
TKM
|
|
2373 |
795
|
|
2374 |
Â
|
|
2375 |
Â
|
|
2376 |
Â
|
|
2377 |
Â
|
|
2378 |
TURKS AND CAICOS ISLANDS
|
|
2379 |
TC
|
|
2380 |
TCA
|
|
2381 |
796
|
|
2382 |
Â
|
|
2383 |
Â
|
|
2384 |
Â
|
|
2385 |
Â
|
|
2386 |
TUVALU
|
|
2387 |
TV
|
|
2388 |
TUV
|
|
2389 |
798
|
|
2390 |
Â
|
|
2391 |
Â
|
|
2392 |
Â
|
|
2393 |
Â
|
|
2394 |
UGANDA
|
|
2395 |
UG
|
|
2396 |
UGA
|
|
2397 |
800
|
|
2398 |
Â
|
|
2399 |
Â
|
|
2400 |
Â
|
|
2401 |
Â
|
|
2402 |
UKRAINE
|
|
2403 |
UA
|
|
2404 |
UKR
|
|
2405 |
804
|
|
2406 |
CTRY_UKRAINE
|
|
2407 |
380
|
|
2408 |
verUkraineÂ
|
|
2409 |
62
|
|
2410 |
UNITED ARAB EMIRATES
|
|
2411 |
AE
|
|
2412 |
ARE
|
|
2413 |
784
|
|
2414 |
CTRY_UAE
|
|
2415 |
971
|
|
2416 |
Â
|
|
2417 |
Â
|
|
2418 |
UNITED KINGDOM
|
|
2419 |
GB
|
|
2420 |
GBR
|
|
2421 |
826
|
|
2422 |
CTRY_UNITED_KINGDOM
|
|
2423 |
44
|
|
2424 |
verBritain
|
|
2425 |
2
|
|
2426 |
UNITED STATES
|
|
2427 |
US
|
|
2428 |
USA
|
|
2429 |
840
|
|
2430 |
CTRY_UNITED_STATES
|
|
2431 |
1
|
|
2432 |
verUS
|
|
2433 |
0
|
|
2434 |
UNITED STATES MINOR OUTLYING ISLANDS
|
|
2435 |
UM
|
|
2436 |
UMI
|
|
2437 |
581
|
|
2438 |
Â
|
|
2439 |
Â
|
|
2440 |
Â
|
|
2441 |
Â
|
|
2442 |
URUGUAY
|
|
2443 |
UY
|
|
2444 |
URY
|
|
2445 |
858
|
|
2446 |
CTRY_URUGUAY
|
|
2447 |
598
|
|
2448 |
Â
|
|
2449 |
Â
|
|
2450 |
UZBEKISTAN
|
|
2451 |
UZ
|
|
2452 |
UZB
|
|
2453 |
860
|
|
2454 |
CTRY_UZBEKISTAN
|
|
2455 |
7
|
|
2456 |
Â
|
|
2457 |
Â
|
|
2458 |
VANUATU
|
|
2459 |
VU
|
|
2460 |
VUT
|
|
2461 |
548
|
|
2462 |
Â
|
|
2463 |
Â
|
|
2464 |
Â
|
|
2465 |
Â
|
|
2466 |
VATICAN CITY STATE (HOLY SEE)
|
|
2467 |
VA
|
|
2468 |
VAT
|
|
2469 |
336
|
|
2470 |
Â
|
|
2471 |
Â
|
|
2472 |
Â
|
|
2473 |
Â
|
|
2474 |
VENEZUELA
|
|
2475 |
VE
|
|
2476 |
VEN
|
|
2477 |
862
|
|
2478 |
CTRY_VENEZUELA
|
|
2479 |
58
|
|
2480 |
Â
|
|
2481 |
Â
|
|
2482 |
VIET NAM
|
|
2483 |
VN
|
|
2484 |
VNM
|
|
2485 |
704
|
|
2486 |
CTRY_VIET_NAM
|
|
2487 |
84
|
|
2488 |
verVietnam
|
|
2489 |
Â
|
|
2490 |
VIRGIN ISLANDS (BRITISH)
|
|
2491 |
VG
|
|
2492 |
VGB
|
|
2493 |
92
|
|
2494 |
Â
|
|
2495 |
Â
|
|
2496 |
Â
|
|
2497 |
Â
|
|
2498 |
VIRGIN ISLANDS (U.S.)
|
|
2499 |
VI
|
|
2500 |
VIR
|
|
2501 |
850
|
|
2502 |
Â
|
|
2503 |
Â
|
|
2504 |
Â
|
|
2505 |
Â
|
|
2506 |
WALLIS AND FUTUNA ISLANDS
|
|
2507 |
WF
|
|
2508 |
WLF
|
|
2509 |
876
|
|
2510 |
Â
|
|
2511 |
Â
|
|
2512 |
Â
|
|
2513 |
Â
|
|
2514 |
WESTERN SAHARA
|
|
2515 |
EH
|
|
2516 |
ESH
|
|
2517 |
732
|
|
2518 |
Â
|
|
2519 |
Â
|
|
2520 |
Â
|
|
2521 |
Â
|
|
2522 |
YEMEN
|
|
2523 |
YE
|
|
2524 |
YEM
|
|
2525 |
887
|
|
2526 |
CTRY_YEMEN
|
|
2527 |
967
|
|
2528 |
Â
|
|
2529 |
Â
|
|
2530 |
YUGOSLAVIA
|
|
2531 |
YU
|
|
2532 |
YUG
|
|
2533 |
891
|
|
2534 |
Â
|
|
2535 |
Â
|
|
2536 |
Â
|
|
2537 |
Â
|
|
2538 |
ZAIRE
|
|
2539 |
ZR
|
|
2540 |
ZAR
|
|
2541 |
180
|
|
2542 |
Â
|
|
2543 |
Â
|
|
2544 |
Â
|
|
2545 |
Â
|
|
2546 |
ZAMBIA
|
|
2547 |
ZM
|
|
2548 |
ZMB
|
|
2549 |
894
|
|
2550 |
Â
|
|
2551 |
Â
|
|
2552 |
Â
|
|
2553 |
Â
|
|
2554 |
ZIMBABWE
|
|
2555 |
ZW
|
|
2556 |
ZWE
|
|
2557 |
716
|
|
2558 |
CTRY_ZIMBABWE
|
|
2559 |
263
|
|
2560 |
Â
|
|
2561 |
Â
|
|
2562 |
'! ! |
|
2563 |
||
2564 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 3'! |
|
2565 |
iso3Countries
|
|
2566 |
"self iso3Countries"
|
|
2567 |
"ISO2Countries _ nil. ISO3Countries := nil"
|
|
2568 |
||
2569 |
ISO3Countries ifNil: [self initISOCountries]. |
|
2570 |
^ISO3Countries! ! |
|
2571 |
||
2572 |
!ISOLanguageDefinition class methodsFor: 'private - ISO 3'! |
|
2573 |
iso3LanguageTable
|
|
2574 |
"self iso3LanguageTable"
|
|
2575 |
||
2576 |
^ISO3Table ifNil: [ISO3Table _ self initISO3LanguageTable]! ! |
|
2577 |
||
2578 |
!Locale methodsFor: 'printing'! |
|
2579 |
printOn: aStream |
|
2580 |
super printOn: aStream. |
|
2581 |
aStream nextPutAll: '(' ; print: id ; nextPutAll: ')'! ! |
|
2582 |
||
2583 |
!Locale methodsFor: 'private'! |
|
2584 |
fetchISO2Language
|
|
2585 |
"Locale current fetchISO2Language"
|
|
2586 |
||
2587 |
| lang isoLang | |
|
2588 |
lang _ self primLanguage. |
|
2589 |
lang ifNil: [ ^ nil ]. |
|
2590 |
lang _ lang copyUpTo: 0 asCharacter. |
|
2591 |
lang size = 2 ifTrue: [ ^ lang ]. |
|
2592 |
isoLang _ ISOLanguageDefinition iso3LanguageDefinition: lang. |
|
2593 |
^ isoLang ifNotNil: [ isoLang iso2 ]! ! |
|
2594 |
||
2595 |
!Locale methodsFor: 'accessing'! |
|
2596 |
determineLocale
|
|
2597 |
self localeID: self determineLocaleID! ! |
|
2598 |
||
2599 |
!Locale methodsFor: 'accessing'! |
|
2600 |
determineLocaleID
|
|
2601 |
"Locale current determineLocaleID"
|
|
2602 |
| langCode isoLang countryCode isoCountry | |
|
2603 |
langCode _ self fetchISO2Language. |
|
2604 |
isoLang _ langCode |
|
2605 |
ifNil: [^self localeID] |
|
2606 |
ifNotNil: [langCode]. |
|
2607 |
countryCode _ self primCountry copyUpTo: 0 asCharacter. |
|
2608 |
isoCountry _ countryCode |
|
2609 |
ifNil: [^LocaleID isoLanguage: isoLang] |
|
2610 |
ifNotNil: [countryCode]. |
|
2611 |
^LocaleID isoLanguage: isoLang isoCountry: isoCountry! ! |
|
2612 |
||
2613 |
!Locale methodsFor: 'accessing'! |
|
2614 |
isoCountry
|
|
2615 |
^self localeID isoCountry! ! |
|
2616 |
||
2617 |
!Locale methodsFor: 'accessing'! |
|
2618 |
isoLanguage
|
|
2619 |
^self localeID isoLanguage! ! |
|
2620 |
||
2621 |
!Locale methodsFor: 'accessing'! |
|
2622 |
isoLocale
|
|
2623 |
"<language>-<country>"
|
|
2624 |
^self isoCountry |
|
2625 |
ifNil: [self isoLanguage] |
|
2626 |
ifNotNil: [self isoLanguage , '-' , self isoCountry]! ! |
|
2627 |
||
2628 |
!Locale methodsFor: 'accessing'! |
|
2629 |
localeID
|
|
2630 |
^id! ! |
|
2631 |
||
2632 |
!Locale methodsFor: 'accessing'! |
|
2633 |
localeID: anID |
|
2634 |
id _ anID! ! |
|
2635 |
||
2636 |
!Locale methodsFor: 'system primitives'! |
|
2637 |
primCountry
|
|
2638 |
"Returns string with country tag according to ISO 639"
|
|
2639 |
<primitive: 'primitiveCountry' module: 'LocalePlugin'>
|
|
2640 |
^'FR'! ! |
|
2641 |
||
2642 |
!Locale methodsFor: 'system primitives'! |
|
2643 |
primCurrencyNotation
|
|
2644 |
"Returns boolean if symbol is pre- (true) or post-fix (false)"
|
|
2645 |
<primitive: 'primitiveCurrencyNotation' module: 'LocalePlugin'>
|
|
2646 |
^true! ! |
|
2647 |
||
2648 |
!Locale methodsFor: 'system primitives'! |
|
2649 |
primCurrencySymbol
|
|
2650 |
"Returns string with currency symbol"
|
|
2651 |
<primitive: 'primitiveCurrencySymbol' module:'LocalePlugin'>
|
|
2652 |
^'$'! ! |
|
2653 |
||
2654 |
!Locale methodsFor: 'system primitives'! |
|
2655 |
primDST
|
|
2656 |
"Returns boolean if DST (daylight saving time) is active or not"
|
|
2657 |
<primitive:'primitiveDaylightSavings' module: 'LocalePlugin'>
|
|
2658 |
^false! ! |
|
2659 |
||
2660 |
!Locale methodsFor: 'system primitives'! |
|
2661 |
primDecimalSymbol
|
|
2662 |
"Returns string with e.g. '.' or ','"
|
|
2663 |
<primitive:'primitiveDecimalSymbol' module: 'LocalePlugin'>
|
|
2664 |
^'.'! ! |
|
2665 |
||
2666 |
!Locale methodsFor: 'system primitives'! |
|
2667 |
primDigitGrouping
|
|
2668 |
"Returns string with e.g. '.' or ',' (thousands etc)"
|
|
2669 |
<primitive:'primitiveDigitGroupingSymbol' module: 'LocalePlugin'>
|
|
2670 |
^','! ! |
|
2671 |
||
2672 |
!Locale methodsFor: 'system primitives'! |
|
2673 |
primLanguage
|
|
2674 |
"returns string with language tag according to ISO 639"
|
|
2675 |
<primitive:'primitiveLanguage' module: 'LocalePlugin'>
|
|
2676 |
^'en'! ! |
|
2677 |
||
2678 |
!Locale methodsFor: 'system primitives'! |
|
2679 |
primLongDateFormat
|
|
2680 |
"Returns the long date format
|
|
2681 |
d day, m month, y year,
|
|
2682 |
double symbol is null padded, single not padded (m=6, mm=06)
|
|
2683 |
dddd weekday
|
|
2684 |
mmmm month name"
|
|
2685 |
<primitive:'primitiveLongDateFormat' module: 'LocalePlugin'>
|
|
2686 |
^'dddd, mmmm d, yyyy' |
|
2687 |
! !
|
|
2688 |
||
2689 |
!Locale methodsFor: 'system primitives'! |
|
2690 |
primMeasurement
|
|
2691 |
"Returns boolean denoting metric(true) or imperial(false)."
|
|
2692 |
<primitive:'primitiveMeasurementMetric' module: 'LocalePlugin'>
|
|
2693 |
^true |
|
2694 |
! !
|
|
2695 |
||
2696 |
!Locale methodsFor: 'system primitives'! |
|
2697 |
primShortDateFormat
|
|
2698 |
"Returns the short date format
|
|
2699 |
d day, m month, y year,
|
|
2700 |
double symbol is null padded, single not padded (m=6, mm=06)
|
|
2701 |
dddd weekday
|
|
2702 |
mmmm month name"
|
|
2703 |
<primitive:'primitiveShortDateFormat' module: 'LocalePlugin'>
|
|
2704 |
^'m/d/yy' |
|
2705 |
! !
|
|
2706 |
||
2707 |
!Locale methodsFor: 'system primitives'! |
|
2708 |
primTimeFormat
|
|
2709 |
"Returns string time format
|
|
2710 |
Format is made up of
|
|
2711 |
h hour (h 12, H 24), m minute, s seconds, x (am/pm String)
|
|
2712 |
double symbol is null padded, single not padded (h=6, hh=06)"
|
|
2713 |
<primitive:'primitiveTimeFormat' module: 'LocalePlugin'>
|
|
2714 |
^'h:mmx' |
|
2715 |
! !
|
|
2716 |
||
2717 |
!Locale methodsFor: 'system primitives'! |
|
2718 |
primTimezone
|
|
2719 |
"The offset from UTC in minutes, with positive offsets being towards the east.
|
|
2720 |
(San Francisco is in UTC -07*60 and Paris is in UTC +02*60 (daylight savings is not in effect)."
|
|
2721 |
<primitive:'primitiveTimezoneOffset' module: 'LocalePlugin'>
|
|
2722 |
^0! ! |
|
2723 |
||
2724 |
!Locale methodsFor: 'system primitives'! |
|
2725 |
primVMOffsetToUTC
|
|
2726 |
"Returns the offset in minutes between the VM and UTC.
|
|
2727 |
If the VM does not support UTC times, this is 0.
|
|
2728 |
Also gives us backward compatibility with old VMs as the primitive will fail and we then can return 0."
|
|
2729 |
<primitive:'primitiveVMOffsetToUTC' module: 'LocalePlugin'>
|
|
2730 |
^0! ! |
|
2731 |
||
2732 |
!Locale class methodsFor: 'system startup' stamp: 'hlsf 7/3/2022 13:08:00'! |
|
2733 |
startUp: resuming |
|
2734 |
resuming ifFalse: [^self]. |
|
2735 |
(Preferences at: #useLocale) |
|
2736 |
ifTrue: [
|
|
2737 |
| newID | |
|
2738 |
newID := self current determineLocaleID. |
|
2739 |
newID ~= LocaleID current |
|
2740 |
ifTrue: [self switchToID: newID]]! ! |
|
2741 |
||
2742 |
!Locale class methodsFor: 'private' stamp: 'hlsf 2/20/2022 10:07:50'! |
|
2743 |
defaultLocales
|
|
2744 |
||
2745 |
"return IDs of default locales"
|
|
2746 |
||
2747 |
^ #(de en es fr it)! ! |
|
2748 |
||
2749 |
!Locale class methodsFor: 'private'! |
|
2750 |
determineCurrentLocale
|
|
2751 |
"For now just return the default locale.
|
|
2752 |
A smarter way would be to determine the current platforms default locale."
|
|
2753 |
"Locale determineCurrentLocale"
|
|
2754 |
||
2755 |
^self new determineLocale! ! |
|
2756 |
||
2757 |
!Locale class methodsFor: 'private'! |
|
2758 |
initKnownLocales
|
|
2759 |
| locales | |
|
2760 |
locales _ Dictionary new. |
|
2761 |
||
2762 |
"Init the locales for which we have translations"
|
|
2763 |
self defaultLocales do: [:id | |
|
2764 |
locales at: id put: (self new localeID: id)]. |
|
2765 |
^locales! ! |
|
2766 |
||
2767 |
!Locale class methodsFor: 'private'! |
|
2768 |
knownLocales
|
|
2769 |
"KnownLocales _ nil"
|
|
2770 |
^KnownLocales ifNil: [KnownLocales _ self initKnownLocales]! ! |
|
2771 |
||
2772 |
!Locale class methodsFor: 'initialization' stamp: 'Install-System-Locales 7/3/2022 12:37:18'! |
|
2773 |
initialize
|
|
2774 |
Smalltalk addToStartUpList: Locale. |
|
2775 |
Preferences
|
|
2776 |
name: #useLocale |
|
2777 |
description: 'Use the system locale to set the system language, etc., at startup. For time-zone handling, see automaticTimezone.' |
|
2778 |
category: #system |
|
2779 |
type: Boolean |
|
2780 |
value: false |
|
2781 |
! !
|
|
2782 |
||
2783 |
!Locale class methodsFor: 'initialization'! |
|
2784 |
initializePlatformEncodings
|
|
2785 |
"Locale initializePlatformEncodings"
|
|
2786 |
||
2787 |
| platform | |
|
2788 |
PlatformEncodings ifNil: [ PlatformEncodings _ Dictionary new ]. |
|
2789 |
||
2790 |
platform _ PlatformEncodings at: 'default' ifAbsentPut: Dictionary new. |
|
2791 |
platform
|
|
2792 |
at: 'default' put: 'iso8859-1'; |
|
2793 |
at: 'Win32 CE' put: 'utf-8'. |
|
2794 |
||
2795 |
platform _ PlatformEncodings at: 'ja' ifAbsentPut: Dictionary new. |
|
2796 |
platform
|
|
2797 |
at: 'default' put: 'shift-jis'; |
|
2798 |
at: 'unix' put: 'euc-jp'; |
|
2799 |
at: 'Win32 CE' put: 'utf-8'. |
|
2800 |
||
2801 |
platform _ PlatformEncodings at: 'ko' ifAbsentPut: Dictionary new. |
|
2802 |
platform
|
|
2803 |
at: 'default' put: 'euc-kr'; |
|
2804 |
at: 'Win32 CE' put: 'utf-8'. |
|
2805 |
||
2806 |
platform _ PlatformEncodings at: 'zh' ifAbsentPut: Dictionary new. |
|
2807 |
platform
|
|
2808 |
at: 'default' put: 'gb2312'; |
|
2809 |
at: 'unix' put: 'euc-cn'; |
|
2810 |
at: 'Win32 CE' put: 'utf-8'. |
|
2811 |
! !
|
|
2812 |
||
2813 |
!Locale class methodsFor: 'settings'! |
|
2814 |
activated
|
|
2815 |
^ Activated ifNil: [Activated _ false]! ! |
|
2816 |
||
2817 |
!Locale class methodsFor: 'settings'! |
|
2818 |
activated: aBoolean |
|
2819 |
Activated _ aBoolean! ! |
|
2820 |
||
2821 |
!Locale class methodsFor: 'platform specific' stamp: 'hlsf 2/20/2022 10:17:30'! |
|
2822 |
defaultEncodingName: languageSymbol |
|
2823 |
| encodings platformName osVersion | |
|
2824 |
platformName _ Smalltalk platformName. |
|
2825 |
osVersion _ Smalltalk osVersion. |
|
2826 |
encodings _ self platformEncodings at: languageSymbol |
|
2827 |
ifAbsent: [self platformEncodings at: #default]. |
|
2828 |
encodings at: platformName ifPresent: [:encoding | ^encoding]. |
|
2829 |
encodings at: platformName , ' ' , osVersion |
|
2830 |
ifPresent: [:encoding | ^encoding]. |
|
2831 |
^encodings at: #default! ! |
|
2832 |
||
2833 |
!Locale class methodsFor: 'accessing'! |
|
2834 |
current
|
|
2835 |
||
2836 |
^ Current ifNil: [ Current _ self determineCurrentLocale ]! ! |
|
2837 |
||
2838 |
!Locale class methodsFor: 'accessing'! |
|
2839 |
currentPlatform: locale during: aBlock |
|
2840 |
"Alter current locale during a block"
|
|
2841 |
| savedLocale | |
|
2842 |
savedLocale _ self current. |
|
2843 |
[self switchTo: locale. |
|
2844 |
aBlock value] |
|
2845 |
ensure: [self switchTo: savedLocale]! ! |
|
2846 |
||
2847 |
!Locale class methodsFor: 'accessing'! |
|
2848 |
isoLanguage: isoLanguage |
|
2849 |
^self isoLanguage: isoLanguage isoCountry: nil! ! |
|
2850 |
||
2851 |
!Locale class methodsFor: 'accessing'! |
|
2852 |
isoLanguage: isoLanguage isoCountry: isoCountry |
|
2853 |
^self localeID: (LocaleID isoLanguage: isoLanguage isoCountry: isoCountry)! ! |
|
2854 |
||
2855 |
!Locale class methodsFor: 'accessing'! |
|
2856 |
languageSymbol: languageSymbol |
|
2857 |
"Locale languageSymbol: #Deutsch"
|
|
2858 |
||
2859 |
^self isoLanguage: (LanguageSymbols at: languageSymbol)! ! |
|
2860 |
||
2861 |
!Locale class methodsFor: 'accessing'! |
|
2862 |
localeID: id |
|
2863 |
^self knownLocales at: id ifAbsentPut: [Locale new localeID: id]! ! |
|
2864 |
||
2865 |
!Locale class methodsFor: 'accessing'! |
|
2866 |
platformEncodings
|
|
2867 |
PlatformEncodings isEmptyOrNil ifTrue: [ self initializePlatformEncodings ]. |
|
2868 |
^PlatformEncodings |
|
2869 |
! !
|
|
2870 |
||
2871 |
!Locale class methodsFor: 'accessing' stamp: 'hlsf 2/20/2022 10:13:01'! |
|
2872 |
switchTo: locale |
|
2873 |
self switchTo: locale gently: false. |
|
2874 |
! !
|
|
2875 |
||
2876 |
!Locale class methodsFor: 'accessing' stamp: 'hlsf 2/20/2022 10:12:21'! |
|
2877 |
switchTo: locale gently: gentlyFlag |
|
2878 |
"Locale switchTo: (Locale isoLanguage: 'de')"
|
|
2879 |
| availableID | |
|
2880 |
availableID := (NaturalLanguageTranslator availableForLocaleID: locale localeID) localeID. |
|
2881 |
Current localeID = availableID |
|
2882 |
ifFalse: [Previous := Current. |
|
2883 |
CurrentPlatform := Current := Locale localeID: availableID. |
|
2884 |
NaturalLanguageTranslator localeChanged. |
|
2885 |
gentlyFlag ifTrue: [self localeChangedGently] ifFalse: [self localeChanged]]! ! |
|
2886 |
||
2887 |
!Locale class methodsFor: 'accessing'! |
|
2888 |
switchToID: localeID |
|
2889 |
"Locale switchToID: (LocaleID isoLanguage: 'de') "
|
|
2890 |
||
2891 |
self switchTo: (Locale localeID: localeID)! ! |
|
2892 |
||
2893 |
!Locale class methodsFor: 'notification' stamp: 'hlsf 2/20/2022 09:54:39'! |
|
2894 |
addLocalChangedListener: anObjectOrClass |
|
2895 |
self localeChangedListeners add: anObjectOrClass! ! |
|
2896 |
||
2897 |
!Locale class methodsFor: 'notification' stamp: 'hlsf 2/20/2022 09:55:07'! |
|
2898 |
localeChanged
|
|
2899 |
" SystemNavigation default allBehaviorsDo: [:b |
|
|
2900 |
b == self ifFalse: [b localeChanged]].
|
|
2901 |
"! !
|
|
2902 |
||
2903 |
!Locale class methodsFor: 'notification' stamp: 'hlsf 2/20/2022 09:55:21'! |
|
2904 |
localeChangedGently
|
|
2905 |
" SystemNavigation default allBehaviorsDo: [:b | b == self ifFalse: [b localeChangedGently]].
|
|
2906 |
"! !
|
|
2907 |
||
2908 |
!Locale class methodsFor: 'notification' stamp: 'hlsf 2/20/2022 09:55:30'! |
|
2909 |
localeChangedListeners
|
|
2910 |
^LocaleChangeListeners ifNil: [LocaleChangeListeners := OrderedCollection new]! ! |
|
2911 |
||
2912 |
!LocaleID methodsFor: 'printing'! |
|
2913 |
posixName
|
|
2914 |
"(LocaleID isoString: 'es-MX') posixName"
|
|
2915 |
"(LocaleID isoString: 'es') posixName"
|
|
2916 |
"language[_territory]"
|
|
2917 |
^ self isoCountry |
|
2918 |
ifNil: [self isoLanguage] |
|
2919 |
ifNotNil: [self isoLanguage , '_' , self isoCountry]! ! |
|
2920 |
||
2921 |
!LocaleID methodsFor: 'printing'! |
|
2922 |
printOn: stream |
|
2923 |
"<language>-<country>"
|
|
2924 |
stream nextPutAll: self isoLanguage. |
|
2925 |
self isoCountry |
|
2926 |
ifNotNil: [stream nextPut: $-; nextPutAll: self isoCountry]! ! |
|
2927 |
||
2928 |
!LocaleID methodsFor: 'printing'! |
|
2929 |
storeOn: aStream |
|
2930 |
aStream nextPut: $(. |
|
2931 |
aStream nextPutAll: self class name. |
|
2932 |
aStream nextPutAll: ' isoString: '. |
|
2933 |
aStream nextPutAll: '''' , self printString , ''''. |
|
2934 |
aStream nextPut: $). |
|
2935 |
! !
|
|
2936 |
||
2937 |
!LocaleID methodsFor: 'comparing'! |
|
2938 |
= anotherObject |
|
2939 |
self class == anotherObject class |
|
2940 |
ifFalse: [^false]. |
|
2941 |
^self isoLanguage = anotherObject isoLanguage |
|
2942 |
and: [self isoCountry = anotherObject isoCountry]! ! |
|
2943 |
||
2944 |
!LocaleID methodsFor: 'comparing'! |
|
2945 |
hash
|
|
2946 |
^self isoLanguage hash bitXor: self isoCountry hash! ! |
|
2947 |
||
2948 |
!LocaleID methodsFor: 'testing'! |
|
2949 |
hasParent
|
|
2950 |
^self isoCountry notNil! ! |
|
2951 |
||
2952 |
!LocaleID methodsFor: 'initialize'! |
|
2953 |
isoLanguage: langString isoCountry: countryStringOrNil |
|
2954 |
isoLanguage _ langString. |
|
2955 |
isoCountry _ countryStringOrNil! ! |
|
2956 |
||
2957 |
!LocaleID methodsFor: 'accessing'! |
|
2958 |
displayCountry
|
|
2959 |
^(ISOLanguageDefinition iso2Countries at: self isoCountry asUppercase ifAbsent: [ self isoCountry ]) ! ! |
|
2960 |
||
2961 |
!LocaleID methodsFor: 'accessing'! |
|
2962 |
displayLanguage
|
|
2963 |
| language | |
|
2964 |
language _ (ISOLanguageDefinition iso2LanguageTable |
|
2965 |
at: self isoLanguage |
|
2966 |
ifAbsent: [^ self isoLanguage]) language. |
|
2967 |
^ self isoCountry |
|
2968 |
ifNil: [language] |
|
2969 |
ifNotNil: [language , ' (' , self displayCountry , ')']! ! |
|
2970 |
||
2971 |
!LocaleID methodsFor: 'accessing'! |
|
2972 |
isoCountry
|
|
2973 |
^isoCountry! ! |
|
2974 |
||
2975 |
!LocaleID methodsFor: 'accessing'! |
|
2976 |
isoLanguage
|
|
2977 |
^isoLanguage! ! |
|
2978 |
||
2979 |
!LocaleID methodsFor: 'accessing'! |
|
2980 |
isoString
|
|
2981 |
^self asString! ! |
|
2982 |
||
2983 |
!LocaleID methodsFor: 'accessing'! |
|
2984 |
parent
|
|
2985 |
^self class isoLanguage: self isoLanguage! ! |
|
2986 |
||
2987 |
!LocaleID methodsFor: 'accessing'! |
|
2988 |
translator
|
|
2989 |
^ NaturalLanguageTranslator localeID: self ! ! |
|
2990 |
||
2991 |
!LocaleID class methodsFor: 'accessing'! |
|
2992 |
current
|
|
2993 |
^Locale current localeID! ! |
|
2994 |
||
2995 |
!LocaleID class methodsFor: 'instance creation'! |
|
2996 |
isoLanguage: langString |
|
2997 |
^self isoLanguage: langString isoCountry: nil! ! |
|
2998 |
||
2999 |
!LocaleID class methodsFor: 'instance creation'! |
|
3000 |
isoLanguage: langString isoCountry: countryStringOrNil |
|
3001 |
^self new isoLanguage: langString isoCountry: countryStringOrNil! ! |
|
3002 |
||
3003 |
!LocaleID class methodsFor: 'instance creation'! |
|
3004 |
isoString: isoString |
|
3005 |
"Parse the isoString (<language>-<country>) into its components and return the matching LocaleID"
|
|
3006 |
"LocaleID isoString: 'en' "
|
|
3007 |
"LocaleID isoString: 'en-us' "
|
|
3008 |
||
3009 |
| parts language country | |
|
3010 |
parts _ isoString findTokens: #($- ). |
|
3011 |
language _ parts first. |
|
3012 |
parts size > 1 |
|
3013 |
ifTrue: [country _ parts second]. |
|
3014 |
^self isoLanguage: language isoCountry: country! ! |
|
3015 |
||
3016 |
!LocaleID class methodsFor: 'instance creation'! |
|
3017 |
posixName: aString |
|
3018 |
^ self |
|
3019 |
isoString: (aString copyReplaceAll: '_' with: '-')! ! |
|
3020 |
||
3021 |
!LocaleID class methodsFor: 'accessing-defaults'! |
|
3022 |
default
|
|
3023 |
^ self isoLanguage: 'en'! ! |
|
3024 |
ISOLanguageDefinition initialize! |
|
3025 |
Locale initialize! |