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

Add all valid countries both in english and greek language #71

Open
tsevdos opened this issue Apr 2, 2024 · 3 comments
Open

Add all valid countries both in english and greek language #71

tsevdos opened this issue Apr 2, 2024 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@tsevdos
Copy link
Owner

tsevdos commented Apr 2, 2024

For start we can get all the available countries with the fn getCountries({ locale: "el" });

@tsevdos tsevdos converted this from a draft issue Apr 2, 2024
@tsevdos tsevdos added the good first issue Good for newcomers label Apr 2, 2024
@tsevdos tsevdos moved this from Todo to In Progress in elUtils package roadmap Apr 28, 2024
@Nikos-Katsafados
Copy link
Contributor

I'll handle this issue

@tsevdos
Copy link
Owner Author

tsevdos commented Apr 29, 2024

Hello there @Nikos-Katsafados ,

We can use all countries countries from ISO_3166-1. Below I'm proposing a JSON schema:

{
    "id": "004",
    "name": "Afghanistan",
    "officialName": "The Islamic Republic of Afghanistan",
    "sovereignty": "UN member",
    "iso31661": {
        "A2": "AF",
        "A3": "AFG"
    },
    "tld": ".af",
    "independent": true
},

Finally I suggest the below 3 fns for implementation (of course feel free to further discuss them):

getAllCountries({locale = "el" }) => Country[]
searchCountryByName({locale = "el",  searchTerm: "greece" }) => Country[]
getCountryByType({locale = "el", type: "iso31661 | tld | id | etc....", value: "value" }) => Country

best regards,
John

@tsevdos tsevdos moved this from In Progress to QA (code review / testing) in elUtils package roadmap Dec 3, 2024
@tsevdos
Copy link
Owner Author

tsevdos commented Dec 7, 2024

All data imported thanks to @Nikos-Katsafados with this PR => #89
I'm working on the fns 😂

@tsevdos tsevdos self-assigned this Dec 7, 2024
@tsevdos tsevdos marked this as a duplicate of #69 Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: QA (code review / testing)
Development

No branches or pull requests

2 participants