function globallink_get_drupal_locales in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink.inc \globallink_get_drupal_locales()
- 7.6 globallink.inc \globallink_get_drupal_locales()
Gets enabled Drupal locales.
Return value
array Array of enabled Drupal locales.
File
- ./
globallink.inc, line 928 - Miscellaneous GlobalLink functions for node translations (non-entity).
Code
function globallink_get_drupal_locales() {
$languages = array();
$result = db_select('languages', 'l')
->fields('l')
->condition('enabled', '1', '=')
->execute();
foreach ($result as $row) {
$languages[$row->language] = $row->name;
}
return $languages;
}