stefangabos / world_countries

Constantly updated lists of world countries and their associated alpha-2, alpha-3 and numeric country codes as defined by the ISO 3166 standard, available in CSV, JSON , PHP, SQL and XML formats, in multiple languages and with national flags included; also available are the ISO 3166-2 codes of provinces/ states associated with the countries

Home Page:http://stefangabos.github.io/world_countries/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSON with data URI flags

rolandtoth opened this issue · comments

Many thanks for this stuff, it came really handy to me.

It would be nice if you could provide a JSON file that would contain flags as data URI strings, or perhaps just an additional JSON with alpha2 + data URI properties. This way they could be downloaded in one request instead of many. For example, in a current project we needed a country dropdown with flags and that would mean 193 individual image request.

image

I manually created such JSON in a web controller and added to a cache, but an "official" version would be nice.

can you please send me that JSON you created, so I can use it as a starting point? thanks!

Hi,

actually I just finished writing a crawler that gets country data from these places:

https://restcountries.eu/rest/v2/all
https://www.countryflags.io/

I need multilanguage country names so I think I'll use the country codes and lookup localized values.

countries.json.txt

awesome, thank you!

Btw I could do several JSON files like this per language, but that would be too large.

This is now available since 2.3.0
I'd love some feedback if that's possible.
Thanks!

Hi,

many thanks for the update, unfortunately I'm not working on any project where I can could this. But will definitely try this out when there'll be one.