A small package to convert a country code to the corresponding country flag emoji.
Note: Emoji flags are not supported on Windows, which displays two-letter country codes instead of emoji flag images.
You can install the package via Composer:
$ composer require stidges/country-flags
$countryFlag = new CountryFlag;
echo $countryFlag->get('NL'); // "🇳🇱"
If you would like to make country codes available under a custom aliases, you can pass these to the constructor:
$countryFlag = new CountryFlag([
'AA' => 'NL',
]);
echo $countryFlag->get('AA'); // "🇳🇱"
Please see CONTRIBUTING for details.
If you discover any security related issues, please email info@stidges.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.