You are here

function location_taxonomize_get_country_name in Location Taxonomize 7.2

Uses the core countries list to return a country name given a code

2 calls to location_taxonomize_get_country_name()
location_taxonomize_af_bulk_taxonomize_op in location_taxonomize_af/location_taxonomize_af.module
Runs the bulk taxonomize operation
location_taxonomize_af_element_submitted in location_taxonomize_af/location_taxonomize_af.module
A submit handler for forms that contain an addressfield

File

./location_taxonomize.inc, line 322
Some useful functions for Location taxonomize

Code

function location_taxonomize_get_country_name($code) {
  require_once DRUPAL_ROOT . '/includes/locale.inc';
  $countries = country_get_list();
  if (isset($countries[strtoupper($code)])) {
    return $countries[strtoupper($code)];
  }
  return NULL;
}