Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all ISO 3166-1 alpha-2 country codes? #53

Open
eric-wren opened this issue May 8, 2023 · 5 comments
Open

Support all ISO 3166-1 alpha-2 country codes? #53

eric-wren opened this issue May 8, 2023 · 5 comments

Comments

@eric-wren
Copy link

Our website allows people to enter their country, including options like "Cayman Islands" (KY), before they get to the step where they enter their phone number. However, we cannot set the Cayman Islands as the defaultCountry for such users.

It would be great if this component could support all 249 assigned country codes: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

We could add additional countries ourselves, but we'd have to look up the dialing code and format for each one ourselves, and maintain. Without this, we will have to fall back to having no defaultCountry; and when the user enters a Cayman Islands phone number, for example, the component will incorrectly show a US flag.

@DfTopas
Copy link

DfTopas commented Aug 30, 2023

Yeah, same goes for our website, where most of our users are from Greenland, and it is missing GL :(

@Vilchynskyi
Copy link

Our users from the Cayman Islands can't type their phone too(

@Loschcode
Copy link

Loschcode commented Apr 19, 2024

I posted 2 unrelated issues that are blockers for me too a few days ago and nobody replied, so I checked the older open issues and realized the list of countries is incomplete indeed.

It's been one full year and the person in charge didn't add those countries — which appears as a simple improvement — so I'm quite worried about using this library in the end.

Shouldn't we fork it / add a pull request and add i18n / all countries? Have you found an alternative on your end? Just curious before I eventually code it myself.

@goveo
Copy link
Owner

goveo commented Apr 20, 2024

Sorry for the long response, didn't have time for the library 😞
Right now working on the Cayman Islands and Greenland country implementation.

I'm not sure that I will implement all country codes for now...
But I will provide a guide for how you can add any new country to the list.

@goveo
Copy link
Owner

goveo commented Apr 20, 2024

@eric-wren @DfTopas @Vilchynskyi
The Cayman Islands and Greenland support was added in v 4.2.8
PR: #177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants