You are here

function countries_i18n_country_entity_label in Countries 7.2

Same name and namespace in other branches
  1. 8 modules/countries_i18n/countries_i18n.module \countries_i18n_country_entity_label()

Providing a hook_entity_info() 'label callback' to ensure modules that use entity_label() get the correct localized country name.

1 string reference to 'countries_i18n_country_entity_label'
countries_i18n_entity_info_alter in modules/countries_i18n/countries_i18n.module
Implements hook_entity_info_alter(). Override the label callback.

File

modules/countries_i18n/countries_i18n.module, line 20
Provides translation for countries module.

Code

function countries_i18n_country_entity_label($country, $entity_type) {
  return countries_i18n_translate($country->iso2, 'name', $country->name, i18n_language_interface()->language);
}