You are here

function lingotek_bulk_grid_query_add_localized_title in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.6 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 1995

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
      ->addExpression("(SELECT GROUP_CONCAT(" . $label_col . '_field_value' . ") FROM {" . $localized_label_table . "} WHERE entity_id=" . $eid . " AND entity_type='" . $entity_type . "' AND language = '" . $GLOBALS['language']->language . "')", 'localized_title');
  }
}