function globallink_interface_get_translation_status in GlobalLink Connect for Drupal 7.6
Gets interface translation status.
Parameters
string $lid: The interface LID.
string $tgt_locale: The target locale.
string $title: The translation title.
Return value
string Status message.
1 call to globallink_interface_get_translation_status()
- globallink_interface_receive_form in globallink_interface/
globallink_interface_receive.inc - Builds form to receive an interface submission.
File
- globallink_interface/
globallink_interface.inc, line 268
Code
function globallink_interface_get_translation_status($lid, $tgt_locale, &$title) {
$query = db_select('globallink_core_interface', 'tco');
$query
->condition('object_id', $lid, '=');
$query
->condition('target', $tgt_locale, '=');
$query
->distinct();
$query
->fields('tco');
$results = $query
->execute();
foreach ($results as $row) {
$title = $row->title;
$interface = globallink_load_source_data($lid);
if (!$interface || is_null($interface)) {
return 'Source Deleted';
}
elseif ($row->status == 'Sent for Translations') {
return 'Translation Completed';
}
elseif ($row->status == 'Error') {
return 'Error';
}
}
return 'Sent for Translations';
}