You are here

function lingotek_update in Lingotek Translation 7.2

Same name and namespace in other branches
  1. 6 lingotek.page.inc \lingotek_update()
1 string reference to 'lingotek_update'
lingotek_menu in ./lingotek.module
Implements hook_menu().

File

./lingotek.page.inc, line 290
Lingotek Tab for Nodes

Code

function lingotek_update($nid) {
  $node = node_load($nid);
  foreach ($_POST['targets'] as $target) {
    lingotek_download_document($node, Lingotek::convertDrupal2Lingotek(check_plain($target)));
  }
  drupal_set_message(t('Updated local translations for the selected languages.'));
  drupal_json_output(array(
    'status' => 0,
    'updated' => $_POST['targets'],
    'nid' => $nid,
  ));
}