You are here

function lingotek_set_node_and_targets_sync_status in Lingotek Translation 7.2

Sets the Node and Target languages to a given value. Note: All targets get the SAME status.

3 calls to lingotek_set_node_and_targets_sync_status()
LingotekApi::addContentDocument in lib/Drupal/lingotek/LingotekApi.php
Add a document to the Lingotek platform.
LingotekApi::updateContentDocument in lib/Drupal/lingotek/LingotekApi.php
Updates the content of an existing Lingotek document with the current node contents.
lingotek_node_update in ./lingotek.module
Implements hook_node_update().

File

./lingotek.sync.inc, line 53
Content translation management and sync functions.

Code

function lingotek_set_node_and_targets_sync_status($node_id, $node_status, $targets_status) {

  // Set the Node to EDITED.
  lingotek_set_node_sync_status($node_id, $node_status);

  // Loop though each target language, and set that target to EDITED.
  $languages = lingotek_get_target_locales();
  foreach ($languages as $lingotek_locale) {
    lingotek_set_target_sync_status($node_id, $lingotek_locale, $targets_status);
  }
}