public static function LingotekConfigSet::deleteSegmentTranslationsBySetIdAndLanguage in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.6 lib/Drupal/lingotek/LingotekConfigSet.php \LingotekConfigSet::deleteSegmentTranslationsBySetIdAndLanguage()
Delete all target segments for a given set
Parameters
int: the ID of the set for which to delete target segments
string: the language code for which to delete target segments
1 call to LingotekConfigSet::deleteSegmentTranslationsBySetIdAndLanguage()
- LingotekConfigSet::downloadTriggered in lib/
Drupal/ lingotek/ LingotekConfigSet.php - Updates the local content of $target_code with data from a Lingotek Document
File
- lib/
Drupal/ lingotek/ LingotekConfigSet.php, line 1082 - Defines LingotekConfigSet.
Class
- LingotekConfigSet
- A class wrapper for Lingotek-specific behavior on ConfigSets.
Code
public static function deleteSegmentTranslationsBySetIdAndLanguage($set_id, $target_language) {
$lids = self::getLidsFromSets($set_id);
db_delete('locales_target')
->condition('language', $target_language)
->condition('lid', $lids, 'IN')
->condition('translation_agent_id', self::getLingotekTranslationAgentId())
->execute();
}