You are here

function getlocations_get_country_name in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_get_country_name()

Get the full country name

Parameters

string $id The two letter iso code of a country:

Return value

string Full country name.

10 calls to getlocations_get_country_name()
getlocations_blocks_country_autocomplete in modules/getlocations_blocks/getlocations_blocks.module
autocomplete for country
getlocations_blocks_country_get in modules/getlocations_blocks/getlocations_blocks.module
getlocations_feeds_set_country in modules/getlocations_feeds/getlocations_feeds.module
Set the country and attempt to support non-iso country imports
getlocations_fields_field_widget_form in modules/getlocations_fields/getlocations_fields.module
Implements hook_field_widget_form(). Return the form for a single field widget.
getlocations_fields_handler_argument_country::query in modules/getlocations_fields/handlers/getlocations_fields_handler_argument_country.inc
Set up the query for this argument.

... See full list

File

./getlocations.module, line 5883
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_get_country_name($id) {
  $countries = getlocations_get_countries_list();
  $id = drupal_strtoupper($id);
  $country = FALSE;
  if (isset($countries[$id])) {
    $country = $countries[$id];
  }
  return $country;
}