You are here

function lingotek_list_nodes_translated_in_language in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_list_nodes_translated_in_language()
  2. 7.4 lingotek.util.inc \lingotek_list_nodes_translated_in_language()
  3. 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 1283
Utility functions.

Code

function lingotek_list_nodes_translated_in_language($language, $bundle = NULL) {
  $query = db_select('{node}')
    ->fields('node', array(
    'tnid',
  ));
  if (!is_null($bundle)) {
    $query
      ->condition('node.type', $bundle);
  }
  $query
    ->condition('node.tnid', 0, '<>')
    ->condition('language', $language)
    ->where('node.nid != node.tnid');
  $nodes = $query
    ->execute()
    ->fetchCol();
  return $nodes;
}