You are here

function lingotek_bulk_grid_query_add_localized_title in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.bulk_grid.inc \lingotek_bulk_grid_query_add_localized_title()
1 call to lingotek_bulk_grid_query_add_localized_title()
lingotek_bulk_grid_query in ./lingotek.bulk_grid.inc

File

./lingotek.bulk_grid.inc, line 1376

Code

function lingotek_bulk_grid_query_add_localized_title($query, $entity_type, $eid, $label_col) {
  $localized_label_table = 'field_data_' . $label_col . '_field';
  if ($label_col && db_table_exists($localized_label_table)) {
    $query
      ->leftJoin('' . $localized_label_table . '', 't_title', 't_title.entity_id = ' . $eid . ' and t_title.entity_type = \'' . $entity_type . '\' and t_title.language=\'' . $GLOBALS['language']->language . '\'');
    $query
      ->addField('t_title', $label_col . '_field_value', 'localized_title');
  }
}