8.5.x core.api.php hook_countries_alter(&$countries)
8.0.x core.api.php hook_countries_alter(&$countries)
8.1.x core.api.php hook_countries_alter(&$countries)
8.2.x core.api.php hook_countries_alter(&$countries)
8.3.x core.api.php hook_countries_alter(&$countries)
8.4.x core.api.php hook_countries_alter(&$countries)
8.6.x core.api.php hook_countries_alter(&$countries)
7.x system.api.php hook_countries_alter(&$countries)

Alter the default country list.

Parameters

$countries: The associative array of countries keyed by ISO 3166-1 country code.

See also

country_get_list()

_country_get_predefined_list()

Related topics

1 invocation of hook_countries_alter()
country_get_list in includes/locale.inc
Get list of all predefined and custom countries.

File

modules/system/system.api.php, line 4727
Hooks provided by Drupal core and the System module.

Code

function hook_countries_alter(&$countries) {

  // Elbonia is now independent, so add it to the country list.
  $countries['EB'] = 'Elbonia';
}