proposal->hasTool($tool)) { throw new Exception(__('Failed to get translation tool')); } if (!$translater->proposal->getTool($tool)->isActive()) { throw new Exception(__('Translation tool is not configured')); } $str_out = (string) $translater->proposal->getTool($tool)->translate($str_in, $from, $to); } $x = new xmlTag('proposal'); $x->lang_from = $from; $x->lang_to = $to; $x->tool = $tool; $x->str_from = $str_in; $x->str_to = text::toUTF8(html::decodeEntities($str_out)); $rsp->insertNode($x); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } return $rsp; } }