You are here

public static function LingotekConfigSet::deleteSegmentTranslationsBySetIdAndLanguage in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 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 985
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();
}