You are here

function lingotek_get_node_and_target_sync_status in Lingotek Translation 7.2

Gets the nodes current sync status array.

File

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

Code

function lingotek_get_node_and_target_sync_status($node_id) {
  $result = array();
  $result['node_sync_status'] = lingotek_get_node_sync_status($node_id);

  // Loop though each target language, and set that target to EDITED.
  $languages = lingotek_get_target_locales();
  foreach ($languages as $lingotek_locale) {
    $result['targets'][$lingotek_locale] = lingotek_get_target_sync_status($node_id, $lingotek_locale);
  }

  /* -- This will be the sync status array format
      array (
      'node_sync_status' => 'EDITED',
      'targets' =>
      array (
      'es_ES' => 'EDITED',
      'pt_BR' => 'CURRENT',
      ),
      )
     */
  return $result;
}