hook_countries_alter(&$countries)
Alter the default country list.
$countries: The associative array of countries keyed by two-letter country code.
\Drupal\Core\Locale\CountryManager::getList()
function hook_countries_alter(&$countries) { // Elbonia is now independent, so add it to the country list. $countries['EB'] = 'Elbonia'; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!core.api.php/function/hook_countries_alter/8.1.x