protected static function LingotekConfigChunk::getNonLingotekLocalesTargets in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.4 lib/Drupal/lingotek/LingotekConfigChunk.php \LingotekConfigChunk::getNonLingotekLocalesTargets()
Get all locales target entries that were not created by Lingotek
1 call to LingotekConfigChunk::getNonLingotekLocalesTargets()
- LingotekConfigChunk::saveSegmentTranslations in lib/
Drupal/ lingotek/ LingotekConfigChunk.php - Save segment target translations for the given language
File
- lib/
Drupal/ lingotek/ LingotekConfigChunk.php, line 811 - Defines LingotekConfigChunk.
Class
- LingotekConfigChunk
- A class wrapper for Lingotek-specific behavior on ConfigChunks.
Code
protected static function getNonLingotekLocalesTargets($document_xml, $target_language) {
$lids = array(
-1,
);
// seed lids for proper query handling on empty case
foreach ($document_xml as $drupal_field_name => $xml_obj) {
$lids[] = self::getLidFromTag($drupal_field_name);
}
$result = db_select('{locales_target}', 'lt')
->fields('lt', array(
'lid',
))
->condition('lid', $lids, 'IN')
->condition('language', $target_language)
->condition('translation_agent_id', self::getLingotekTranslationAgentId(), '!=')
->execute();
return $result
->fetchCol();
}