function lingotek_list_nodes_translated_in_language in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.4 lingotek.util.inc \lingotek_list_nodes_translated_in_language()
- 7.5 lingotek.util.inc \lingotek_list_nodes_translated_in_language()
- 7.6 lingotek.util.inc \lingotek_list_nodes_translated_in_language()
1 call to lingotek_list_nodes_translated_in_language()
- lingotek_batch_identify_translations in ./
lingotek.util.inc - Batch Create: Lingotek Identify Content - create informative lingotek_entity_ data (in lingotek table) for pre-existing content
File
- ./
lingotek.util.inc, line 2000 - Utility functions.
Code
function lingotek_list_nodes_translated_in_language($language, $bundle = NULL) {
$disabled_bundles = lingotek_get_disabled_bundles('node');
$query = db_select('node')
->fields('node', array(
'tnid',
));
if (!is_null($bundle)) {
$query
->condition('node.type', $bundle);
}
if (!empty($disabled_bundles)) {
$query
->condition('type', $disabled_bundles, 'NOT IN');
}
$query
->condition('node.tnid', 0, '<>')
->condition('language', $language)
->where('node.nid != node.tnid');
$nodes = $query
->execute()
->fetchCol();
return $nodes;
}