Monarobase / country-list

List of all countries with names and ISO 3166-1 codes in all languages and data formats
243 stars 37 forks source link

Add UK alias for United Kingdom #28

Closed Messhias closed 11 months ago

Messhias commented 3 years ago

If we insert UK to getOne function we get this error:

Screenshot 2021-06-16 at 11 20 00

But the UK it's a standard for the whole EU and some other countries in the Asia and middle-east (e.g. India, United Arab Emirates, and most countries was a UK colony in the history).

Messhias commented 3 years ago

Did someone has checked that?

amharris commented 1 year ago

@Messhias The alpha-2 code for the United Kingdom is GB, not UK.

Wikipedia provides a nice description for the reason, here. At the time of writing, it states:

The codes are chosen, according to the ISO 3166/MA, "to reflect the significant, unique component of the country name in order to allow a visual association between country name and country code".[5] For this reason, common components of country names like "Republic", "Kingdom", "United", "Federal" or "Democratic" are normally not used for deriving the code elements. As a consequence, for example, the United Kingdom is officially assigned the alpha-2 code GB rather than UK, based on its official name "United Kingdom of Great Britain and Northern Ireland" (although UK is reserved on the request of the United Kingdom). Some codes are chosen based on the native names of the countries. For example, Germany is assigned the alpha-2 code DE, based on its native name "Deutschland".