juancamunoz/country-code-to-emoji-flags

Converts string of country codes into string of emoji flags.

1.0 2022-04-12 14:24 UTC

This package is auto-updated.

Last update: 2024-06-12 19:41:48 UTC


README

Download per Month License

Converts a country code to emoji flag. Most flags use a 2-letter code, but some use more (eg England=gbeng, Scotland=gbsct, Wales=gbwls, etc).

Why Emoji❓

Emoji symbol is a textual replacement for a graphic image file while having the benefits of a graphic image. The image file is already present at your intended destination (a person's device), so why would you transmit the image to them again and again? -- Use emoji!

use juancamunoz\flagEmoji\flagEmoji;

echo flagEmoji::convert('uk');    # 🇬🇧
echo flagEmoji::convert('gbwls'); # 🏴󠁧󠁢󠁷󠁬󠁳󠁿
echo flagEmoji::convert('gbsct'); # 🏴󠁧󠁢󠁳󠁣󠁴󠁿
echo flagEmoji::convert('gbeng'); # 🏴󠁧󠁢󠁥󠁮󠁧󠁿

country-code-to-emoji-flags