function lingotek_get_current_locales in Lingotek Translation 7.7
1 call to lingotek_get_current_locales()
File
- ./
lingotek.util.inc, line 2683 - Utility functions.
Code
function lingotek_get_current_locales($entity_type, $entity_id) {
$query = db_select('lingotek_entity_metadata', 'lem')
->fields('lem', array(
'entity_key',
))
->condition('lem.entity_type', $entity_type)
->condition('lem.entity_id', $entity_id)
->condition('lem.entity_key', 'target_sync_status_%', 'LIKE');
$result = $query
->execute()
->fetchCol();
$locales = array();
foreach ($result as $target_str) {
$locales[] = str_replace('target_sync_status_', '', $target_str);
}
return $locales;
}