function lingotek_get_target_locales in Lingotek Translation 7.3
Same name and namespace in other branches
- 7.7 lingotek.util.inc \lingotek_get_target_locales()
- 7.2 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
1 call to lingotek_get_target_locales()
- 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.
File
- ./
lingotek.util.inc, line 843 - 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;
}