function location_get_iso3166_list in Location 7.4
Same name and namespace in other branches
- 5.3 location.inc \location_get_iso3166_list()
- 5 location.inc \location_get_iso3166_list()
- 6.3 location.inc \location_get_iso3166_list()
- 7.5 location.inc \location_get_iso3166_list()
- 7.3 location.inc \location_get_iso3166_list()
The following is an array of all countrycode => country-name pairs as layed out in ISO 3166-1 alpha-2
11 calls to location_get_iso3166_list()
- google_geocode_country_list in geocoding/
google.inc - Return the list of ISO3166 codes supported by this geocoder. Coverage list: http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html Coverage list feed: http://spreadsheets.google.com/feeds/list/p9pdwsai2hDMsLkXsoM05KQ/defaul...
- location_admin_settings in ./
location.admin.inc - Admin settings form.
- location_country_name in ./
location.inc - Get the translated name of a country code.
- location_generate_nodeapi in contrib/
location_generate/ location_generate.module - Implementation of hook_nodeapi().
- location_geocoding_parameters_page in ./
location.module
File
- ./
location.inc, line 645
Code
function location_get_iso3166_list($upper = FALSE) {
include_once DRUPAL_ROOT . '/includes/locale.inc';
// Statically cache a version of the core Drupal list of countries
// with lower case country codes for use by this module.
$countries =& drupal_static(__FUNCTION__);
if ($upper) {
// Drupal core stores ISO 3166-1 alpha2 codes in upper case, as
// per the ISO standard.
return country_get_list();
}
elseif (!isset($countries)) {
// Location module uses lower-case ISO 3166-1 alpha2 codes, so we need
// to convert.
$countries = array_change_key_case(country_get_list(), CASE_LOWER);
}
return $countries;
}