function lingotek_get_target_locales in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_get_target_locales()
- 7.3 lingotek.util.inc \lingotek_get_target_locales()
- 7.4 lingotek.util.inc \lingotek_get_target_locales()
- 7.5 lingotek.util.inc \lingotek_get_target_locales()
- 7.6 lingotek.util.inc \lingotek_get_target_locales()
Get only the languages that are lingotek_enabled
3 calls to lingotek_get_target_locales()
- lingotek_get_node_and_target_sync_status in ./
lingotek.sync.inc - Gets the nodes current sync status array.
- lingotek_get_sync_download_batch_elements in ./
lingotek.batch.inc - Sync - Download Batch Elements: Creates the batch elements for nodes/documents that need to be downloaded.
- lingotek_set_node_and_targets_sync_status in ./
lingotek.sync.inc - Sets the Node and Target languages to a given value. Note: All targets get the SAME status.
File
- ./
lingotek.util.inc, line 826 - Utility functions.
Code
function lingotek_get_target_locales($codes_only = TRUE) {
$target_languages = db_query("SELECT * FROM {languages} WHERE lingotek_enabled = :lingotek_enabled", array(
':lingotek_enabled' => 1,
))
->fetchAll();
$target_codes = array();
foreach ($target_languages as $target_language) {
$target_codes[] = $target_language->lingotek_locale;
}
return $codes_only ? $target_codes : $target_languages;
}