function lingotek_sync in Lingotek Translation 7.2
Same name and namespace in other branches
- 7.3 lingotek.sync.inc \lingotek_sync()
- 7.4 lingotek.sync.inc \lingotek_sync()
The main function responsible for syncing node/document translation.
6 string references to 'lingotek_sync'
- LingotekNode::loadLingonode in lib/
Drupal/ lingotek/ LingotekNode.php - Method for loading the values for the lingonode
- lingotek_admin_form in ./
lingotek.admin.inc - Form constructor for the administration form.
- lingotek_form_node_form_alter in ./
lingotek.module - Implements hook_form_BASE_FORM_ID_alter().
- lingotek_menu in ./
lingotek.module - Implements hook_menu().
- lingotek_node_sync in ./
lingotek.util.inc - Synchronize the node's content with current translations as stored on the Lingotek platform.
File
- ./
lingotek.sync.inc, line 258 - Content translation management and sync functions.
Code
function lingotek_sync() {
lingotek_sync_batch_create_old();
/*$parameters = $_GET;
$method = $_SERVER['REQUEST_METHOD'];
$status = "200";
$test = isset($parameters['test']) && $parameters['test'] && strcmp($parameters['test'], 'false') != 0 ? true : false;
$request = array(
'test' => $test,
'method' => $method,
'parameters' => $parameters
);
$request['upload'] = $upload = isset($parameters['upload']) && $parameters['upload'] && strcmp($parameters['upload'], 'false') != 0 ? true : false;
$request['download'] = $download = isset($parameters['download']) && $parameters['download'] && strcmp($parameters['download'], 'false') != 0 ? true : false;
$request['lingotek_locales'] = $lingotek_locales = isset($parameters['codes']) ? array_map(function($val) {
return trim($val);
}, explode(',', $parameters['codes'])) : array();
if ($upload) {
$request['upload_et'] = $upload_et = isset($parameters['upload_et']) && $parameters['upload_et'] && strcmp($parameters['upload_et'], 'false') != 0 ? true : false;
}
if ($download) {
$request['download_incomplete'] = $download_incomplete = isset($parameters['download_incomplete']) && $parameters['download_incomplete'] && strcmp($parameters['download_incomplete'], 'false') != 0 ? true : false;
}
if($test) {
lingotek_json_output_cors($request, $status, array('methods_allowed' => 'GET,POST'));
} else {
lingotek_sync_batch_create($upload, $download, $upload_et, $download_incomplete);
}*/
}