You are here

function location_load_country in Location 7.3

Same name and namespace in other branches
  1. 5.3 location.inc \location_load_country()
  2. 6.3 location.inc \location_load_country()
  3. 7.5 location.inc \location_load_country()
  4. 7.4 location.inc \location_load_country()

Load support for a country.

This function will load support for a country identified by its two-letter ISO code.

Parameters

string $country: Two-letter ISO code for country.

Return value

bool TRUE if the file was found and loaded, FALSE otherwise.

10 calls to location_load_country()
location_country_bounds in ./location.inc
Get an appropriate bounding box for showing an entire country on a map.
location_geocoding_options_form in ./location.admin.inc
Options form.
location_geocoding_parameters_form in ./location.module
Parameters form.
location_get_postalcode_data in ./location.inc
Try to extract the the Latitude and Longitude data from the postal code.
location_get_provinces in ./location.inc
Fetch the provinces for a country.

... See full list

File

./location.inc, line 698
Public API for the Location module.

Code

function location_load_country($country) {
  location_standardize_country_code($country);
  $file = DRUPAL_ROOT . '/' . drupal_get_path('module', 'location') . '/supported/location.' . $country . '.inc';
  if (file_exists($file)) {
    include_once $file;
    return TRUE;
  }
  return FALSE;
}