function globallink_get_locale_name in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.7 globallink.inc \globallink_get_locale_name()
- 7.5 globallink.inc \globallink_get_locale_name()
Gets locale name based on its code.
Parameters
string $locale_code: The locale code.
Return value
string The locale name.
File
- ./
globallink.inc, line 259 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_get_locale_name($locale_code) {
$result = db_select('globallink_locale', 'tl')
->fields('tl')
->condition('locale_code', $locale_code, '=')
->execute();
$locale_name = '';
foreach ($result as $row) {
$locale_name = $row->locale_desc;
}
return $locale_name;
}