meedamian / country-emoji Goto Github PK
View Code? Open in Web Editor NEWConverts between country names, ISO 3166-1 codes and flag emojis.
Home Page: https://www.npmjs.com/package/country-emoji
License: MIT License
Converts between country names, ISO 3166-1 codes and flag emojis.
Home Page: https://www.npmjs.com/package/country-emoji
License: MIT License
Country flags don't display as flags on Windows. This breaks the looks of a website using flags quite badly.
This seems to be for political reasons, see e.g. https://answers.microsoft.com/en-us/windows/forum/all/flag-emoji/85b163bc-786a-4918-9042-763ccf4b6c05?page=1
It would be great to have a workaround. Here are some potential solutions: https://stackoverflow.com/questions/54519758/flag-emojis-not-rendering/54663926
🏴 Flag: England
🏴 Flag: Scotland
🏴 Flag: Wales
Above 3 emojis are added in Emoji 5.0... and I think it can be added to the library.
Hello,
looks like we are shipping ES6 here and this is the error I see in production logs.
Can we ship in ES5, please?
Or can I do something on my end?
Thank you.
Currently, the lib does not support the following codes:
Turkey is now called Türkiye
India is also changing the name, so, we have to add them
Using Curaçao 🇨🇼 as an example.
Despite the countries.json having Curaçao listed in the repository, when using this package on version 1.5.6
, Curaçao is omitted from the countries.json.
I suspect that even though this list was updated here: #26 - the updates have not been published?
Hey @meeDamian !
Thank you for creating country-emoji.
It was very useful for my Node.js chatbot and CLI tools.
I've just ported some alpha of it to Rust, and will continue enhancing it with some Rust-specific touches (docs, tests).
I added your repo in the credits, hope that you like it!
Kind regards,
Leo
https://github.com/leodutra/country-emoji
https://crates.io/crates/country-emoji
Thanks for the library.
I've just ported it to python and published as a package on PYPI.
I hope you can add it to the list of ports.
Repo: https://github.com/Nnonexistent/country-emoji
Package: https://pypi.org/project/country-emoji/
Best regards,
Nik
Hi @meeDamian !
Thanks for sharing the very useful JS library!
I've just created a library called SwiftFlags, the basically recreate your amazing library in Swift.
I added your repo in the credits, hope that you like it!
Bye!
Hi, there.
I've just tried to display a flag in my react native app and it doesn't work.
I've created from scratch a new project and that is the code I've used:
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native! {flag('CL')}
</Text>
<Text style={styles.instructions}>
To get started, edit App.js
</Text>
<Text style={styles.instructions}>
{instructions}
</Text>
</View>
Thank you
Line 108 in d0cd2c9
In some case, it's useful to get the full list of countries.
For example, to display all countries in a select input.
Something like this (with JSX) :
import { countries } from 'country-emoji'
const SelectCountries = () => (
<select>
{countries.map(country => (
<option value={country.code}>{country.flag}</option>
))}
</select>
)
Czechia
is the official shortened name for the Czech Republic, but it does not appear in the countries.json
file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.