LucianoGanga / country-codes-list

List of codes per country (languages, calling codes, currency codes, etc)
MIT License
94 stars 48 forks source link

Consider adding Worldbase 2 character country codes #38

Open Jackman3005 opened 1 year ago

Jackman3005 commented 1 year ago

We are using this library inside of an Expo react-native app (iOS, Android & Web) and when requesting the region code via the following mechanism we have received XA from a Windows device on Chrome. After further investigation on this site XA appears to be the WorldBase 2 character representation for United Arab Emirates. Since we are not in control of what the operating system provides when asking for the region code we do not have a way of using a different ISO compliant region code.

Would it be possible to add the WorldBase 2 character country codes to this dataset?

import * as Localization from "expo-localization";
const regionCode = Localization.getLocales()?.[0]?.regionCode;