You are here

function lingotek_save_segment in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 6 lingotek.api.inc \lingotek_save_segment()
  2. 7.2 lingotek.api.inc \lingotek_save_segment()
  3. 7.3 lingotek.api.inc \lingotek_save_segment()
  4. 7.4 lingotek.api.inc \lingotek_save_segment()
  5. 7.5 lingotek.remote.inc \lingotek_save_segment()

File

./lingotek.remote.inc, line 391

Code

function lingotek_save_segment($source_text, $target_text, $target_language, $doc_id) {
  $param = array(
    "sourceText" => $source_text,
    "targetText" => $target_text,
    "targetLanguage" => $target_language,
    "documentId" => $doc_id,
    "overwrite" => 0,
  );
  $save_segment = LingotekApi::instance()
    ->request("saveSegment", $param);
  return $save_segment->results == "success";
}