country-regions / country-region-data

A source list of countries, regions and shortcodes in JSON and JS format.
MIT License
405 stars 357 forks source link

Add flags for the countries #116

Open Azeirah opened 2 years ago

Azeirah commented 2 years ago

It would be great if there was a simple flag image for every individual country, of course including alternatives if a country has multiple for any reason.

Of course this is a pretty big request, but I'd like to know what others think? Do flags belong in a project like this? I believe it would be very relevant and useful.

Edit: I saw that other projects use emojis as flag icons, that would be perfect for this repo too! Check out react-native-country-picker-modal for instance

mahmudunnabikajal commented 1 year ago

@benkeen I'd love to contribute by adding flag images for each country! 🌍 Here's an example of what I'm thinking:

{
  "countryName": "Afghanistan",
  "countryShortCode": "AF",
+ "flag": "data:image/png;base64,iVBORw0KG.....",
  "regions": [
    {
      "name": "Badakhshan",
      "shortCode": "BDS"
    }
  ]
}

If you agree then I will start working and create a pull request for this.