I just would like to share what I recently have found.
If you need some flags in your application you can add them easily via composer: yii2-flags. Project page: https://github.com/Filsh/yii2-flags
You just have to install it, register the asset into your view and use the widget. Quite easy and simple.
use yii\flags\Flags;
use yii\flags\FlagsAsset;
FlagsAsset::register($this);
<?= Flags::widget([
'flag' => 'UA',
'type' => Flags::FLAT_24,
'useSprite' => false // use sprite image? default is false
]); ?>
That’s all. Then you have hundreds of flags you can use.