<?php
class ApiTranslateService {
public $loghatnameh;
function __construct(){
}
function translate(){
$this->loghatnameh = new Loghatnameh();
}
public function getTranslationFromLoghatnameh(){
$word = $this->getTG()->word;
$noHtmlTag = true;
if ($this->dictionary->translated && $this->dictionary->wordIsSearched)
return true;
$translationsArray = $this->loghatnameh->translate ( urlencode ($word), "FA" );
$this->dictionary->insertWordsWithTranslation($translationsArray, "FA", $word);
$this->dictionary->getTrnslations ( $word, "FA" );
$translatedTextMessage = $this->dictionary->makeTranslationTextMessage($noHtmlTag);
$translationsArray = $this->loghatnameh->translate ( $word, "DE" );
$this->dictionary->insertWordsWithTranslation($translationsArray, "DE", $word);
$this->dictionary->getTrnslations ( $word, "DE" );
$translatedTextMessage = $this->dictionary->makeTranslationTextMessage($noHtmlTag);
}
}
?>