Ejemplo n.º 1
0
 public function dictionnaryAction()
 {
     $identifier = $this->_getParam('identifier');
     $lang = $this->_getParam('lang');
     $type = $this->_getParam('type');
     $this->view->assign('success', 'false');
     $dictionaryForm = new FormDictionnary();
     if ($this->_request->isPost()) {
         $formData = $this->_request->getPost();
         if ($dictionaryForm->isValid($formData)) {
             Cible_Translation::set($identifier, $type, $formData['ST_Value'], $lang);
             $this->view->assign('success', 'true');
             $this->view->assign('value', $formData['ST_Value']);
         } else {
             $dictionaryForm->populate($formData);
         }
     } else {
         var_dump(Cible_Translation::__($identifier, $type, $lang));
         exit;
         $data = array('ST_Identifier' => $identifier, 'ST_Value' => Cible_Translation::__($identifier, $type, $lang), 'ST_LangID' => $lang, 'ST_Type' => $type);
         $dictionaryForm->populate($data);
     }
     $this->view->assign('form', $dictionaryForm);
 }
Ejemplo n.º 2
0
 public function getCibleText($key, $lang = null)
 {
     return Cible_Translation::__($key, Cible_Translation::TRANSLATION_TYPE_CIBLE, $lang);
 }
Ejemplo n.º 3
0
 public function getClientText($key, $lang = null)
 {
     return Cible_Translation::__($key, Cible_Translation::TRANSLATION_TYPE_CLIENT, $lang);
 }