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

JSON with data URI flags #41

Closed
rolandtoth opened this issue Oct 7, 2020 · 6 comments
Closed

JSON with data URI flags #41

rolandtoth opened this issue Oct 7, 2020 · 6 comments

Comments

@rolandtoth
Copy link

rolandtoth commented Oct 7, 2020

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.

@stefangabos
Copy link
Owner

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

@rolandtoth
Copy link
Author

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

@stefangabos
Copy link
Owner

stefangabos commented Oct 8, 2020

awesome, thank you!

@rolandtoth
Copy link
Author

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

@stefangabos
Copy link
Owner

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

@rolandtoth
Copy link
Author

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.

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

2 participants