|
1 | 1 | # Default country code. |
2 | 2 | default_code = "XX" |
3 | 3 |
|
4 | | -# Mapping of country names to alpha-2 codes. |
| 4 | +# Mapping of country names to alpha-2 codes according to |
| 5 | +# https://en.wikipedia.org/wiki/ISO_3166-1. |
| 6 | +# As a reference see also https://github.com/TakahikoKawasaki/nv-i18n (in Java) |
5 | 7 | is_3166_1 = { |
6 | 8 | "Afghanistan" : "AF", |
7 | 9 | "Åland Islands" : "AX", |
|
122 | 124 | "Kiribati" : "KI", |
123 | 125 | "Korea, Democratic People's Republic of" : "KP", |
124 | 126 | "Korea, Republic of" : "KR", |
125 | | - # Introducing Kosovo may be controversial. I guess we need to bite the bullet. |
126 | | - "Kosovo" : "XK", |
| 127 | + "Kosovo, Republic of" : "XK", |
127 | 128 | "Kuwait" : "KW", |
128 | 129 | "Kyrgyzstan" : "KG", |
129 | 130 | "Lao People's Democratic Republic" : "LA", |
|
218 | 219 | "Sudan" : "SD", |
219 | 220 | "Suriname" : "SR", |
220 | 221 | "Svalbard and Jan Mayen" : "SJ", |
221 | | - "Swaziland" : "SZ", |
| 222 | + "Eswatini" : "SZ", # previous name "Swaziland" |
222 | 223 | "Sweden" : "SE", |
223 | 224 | "Switzerland" : "CH", |
224 | 225 | "Syrian Arab Republic" : "SY", |
|
254 | 255 | "Yemen" : "YE", |
255 | 256 | "Zambia" : "ZM", |
256 | 257 | "Zimbabwe" : "ZW", |
| 258 | + |
| 259 | + # see also |
| 260 | + # https://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent_(data_file)#Data_file |
| 261 | + # https://en.wikipedia.org/wiki/List_of_sovereign_states_and_dependent_territories_by_continent |
| 262 | + "United Nations Neutral Zone" : "XD", |
| 263 | + "Iraq-Saudi Arabia Neutral Zone" : "XE", |
| 264 | + "Spratly Islands" : "XS", |
| 265 | + |
| 266 | + # TODO "Disputed Territory" conflicts with `default_code` |
| 267 | + # "Disputed Territory" : "XX", |
257 | 268 | } |
258 | 269 |
|
259 | 270 | # Mapping of alternative names, spelling, typos to the names of countries used |
|
340 | 351 | "Deutschland" : "Germany", |
341 | 352 | "The Bahamas" : "Bahamas", |
342 | 353 | "The Gambia" : "Gambia", |
| 354 | + "Kosovo" : "Kosovo, Republic of", |
| 355 | + "Swaziland" : "Eswatini", |
| 356 | + "Gambia, The" : "Gambia", |
343 | 357 | # "Others" has no mapping, i.e. the default val is used |
344 | 358 | # "Cruise Ship" has no mapping, i.e. the default val is used |
345 | 359 | } |
|
0 commit comments