public function translationDetermineParentAction()
{
$success = false;
$targetPath = null;
$document = Document::getById($this->getParam("id"));
if ($document) {
$service = new Document\Service();
$translations = $service->getTranslations($document->getParent());
if (isset($translations[$this->getParam("language")])) {
$targetDocument = Document::getById($translations[$this->getParam("language")]);
$targetPath = $targetDocument->getRealFullPath();
$success = true;
}
}
$this->_helper->json(["success" => $success, "targetPath" => $targetPath]);
}