This package is abandoned and no longer maintained. No replacement package was suggested.

Provides access to various country flags

0.1.2 2014-07-23 20:02 UTC

This package is not auto-updated.

Last update: 2021-08-06 23:27:27 UTC


Code Climate

#ShiftpiCountryFlags Provides access to various country flags


Using Composer

Require shiftpi/country-flags in your composer.json. Then update your dependencies. You can now enable the module in the config/application.config.php file:

// ...
'modules' => array(
    // ...
    // ...
// ...

If you are using Windows, make sure php_fileinfo.dll is loaded.


Copy vendor/shiftpi/country-flags/config/ to config/autoload/

Edit the configuration file (if needed):

return array(
    'countryflags' => array(
        'mapper' => 'ShiftpiCountryFlags\Mapper\Filename',      // country code -> file path mapper
        'datapath' => '/alternative/data/path',                 // new since 0.1.1; optional



By default the module provides a route to access the flags:


Where countrycode is the ISO 3166 ALPHA-2 code (see Size defines the width and height of the flag in px. Possible values are 16, 24, 32, 48, 64. Default is 16.

View Helper

<img src="<?php echo $this->countryFlagUrl('SC', 64) ?>" alt="Seychelles" width="64" />

Where the second parameter (size) is optional (default 16).


Licensed under the MIT license. See license file. The flag icons are from (licensed under the MIT license, too).