当前位置: 首页>>代码示例>>PHP>>正文


PHP translateFN函数代码示例

本文整理汇总了PHP中translateFN函数的典型用法代码示例。如果您正苦于以下问题:PHP translateFN函数的具体用法?PHP translateFN怎么用?PHP translateFN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了translateFN函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addRadios('delete', translateFN('Vuoi rimuovere davvero la classe?'), array(0 => translateFN('No'), 1 => translateFN('Si')), 0);
     $this->addHidden('id_course');
     $this->addHidden('id_course_instance');
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:7,代码来源:CourseInstanceRemovalForm.inc.php

示例2: content

 protected function content()
 {
     $this->common_elements();
     //apostrofo
     $cloze_apostrophe = 'cloze_apostrofo';
     $options = array(ADA_NO_APOSTROPHE_TEST_MULTIPLE => translateFN('Senza apostrofo'), ADA_APOSTROPHE_TEST_MULTIPLE => translateFN('Con apostrofo'));
     if (isset($this->data[$cloze_apostrophe])) {
         $defaultValue = $this->data[$cloze_apostrophe];
     } else {
         $defaultValue = ADA_NO_APOSTROPHE_TEST_MULTIPLE;
     }
     $this->addSelect($cloze_apostrophe, translateFN('Tipologia di esercizio') . ':', $options, $defaultValue);
     //posizione box
     $box = 'box_position';
     $options = array(ADA_TOP_TEST_DRAGDROP => translateFN('Sopra il testo'), ADA_RIGHT_TEST_DRAGDROP => translateFN('A destra del testo'), ADA_BOTTOM_TEST_DRAGDROP => translateFN('Sotto il testo'), ADA_LEFT_TEST_DRAGDROP => translateFN('A sinistra del testo'));
     if (isset($this->data[$box])) {
         $defaultValue = $this->data[$box];
     } else {
         $defaultValue = ADA_RIGHT_TEST_DRAGDROP;
     }
     $this->addSelect($box, translateFN('Posizione box drag\'n\'drop') . ':', $options, $defaultValue);
     //titolo drag'n'drop
     $titolo = 'titolo_dragdrop';
     if (isset($this->data[$titolo])) {
         $defaultValue = $this->data[$titolo];
     } else {
         $defaultValue = null;
     }
     $this->addHidden('titolo_dragdrop')->withData(htmlentities($defaultValue, ENT_COMPAT | ENT_HTML401, ADA_CHARSET));
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:30,代码来源:questionMultipleClozeFormTest.inc.php

示例3: run

 /**
  * build, manage and display the module's pages
  *
  * @return array
  *
  * @access public
  */
 public function run($action = null)
 {
     /* @var $html	string holds html code to be retuned */
     $htmlObj = null;
     /* @var $path	string  path var to render in the help message */
     $help = translateFN('Da qui puoi inserire o modifcare un login provider');
     /* @var $status	string status var to render in the breadcrumbs */
     $title = translateFN('Login Provider');
     switch ($action) {
         case MODULES_LOGIN_EDIT_LOGINPROVIDER:
             /**
              * edit action, display the form with passed data
              */
             /**
              * CARICARE LE CLASSI DAI FILES!!!!!
              */
             $htmlObj = new FormLoginProvider($this->toArray(), null, null, self::getAvailableClasses());
         default:
             /**
              * return an empty page as default action
              */
             break;
     }
     return array('htmlObj' => $htmlObj, 'help' => $help, 'title' => $title);
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:32,代码来源:loginProviderManagement.inc.php

示例4: render

 /**
  * Control rendering
  *
  * @return string
  */
 public function render()
 {
     $select = CDOMElement::create('select', 'id:' . $this->id . ',class:form');
     if (empty($this->files)) {
         $option = CDOMElement::create('option', 'value:template_clear');
         $option->addChild(new CText(translateFN('Nessun template trovato')));
         $select->addChild($option);
     } else {
         $option = CDOMElement::create('option');
         $option->setAttribute('value', '');
         $option->addChild(new CText(translateFN('Vuoto')));
         $select->addChild($option);
         $i = 0;
         foreach ($this->files as $k => $v) {
             $option = CDOMElement::create('option');
             $option->setAttribute('value', htmlspecialchars($v));
             $option->addChild(new CText($k));
             $select->addChild($option);
             $i++;
         }
     }
     $button = CDOMElement::create('input_button');
     $button->setAttribute('id', $this->id . '_button');
     $button->setAttribute('value', translateFN('Inserisci template'));
     $button->setAttribute('style', 'float:right;');
     $html = '<label id="l_' . $this->id . '" for="' . $this->id . '" class="' . self::DEFAULT_CLASS . '">' . $this->label . '</label> ' . $button->getHtml() . ' ' . $select->getHtml();
     return $html;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:33,代码来源:templateEditorControlTest.inc.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $desc = translateFN("Vuoi davvero cancellare la chat selezionata?") . ' ' . translateFN('Saranno cancellate anche le conversazioni della chat');
     $this->addRadios('delete', $desc, array(0 => translateFN('No'), 1 => translateFN('Si')), 0);
     $this->addHidden('id_room');
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:7,代码来源:ChatRemovalForm.inc.php

示例6: content

 protected function content()
 {
     //nome
     if (!empty($this->data['nome'])) {
         $defaultValue = $this->data['nome'];
     } else {
         $defaultValue = '';
     }
     $this->addTextInput('nome', translateFN('Nome (visualizzato nella breadcrumb)') . ':')->setRequired()->setValidator(FormValidator::NOT_EMPTY_STRING_VALIDATOR)->withData($defaultValue);
     //titolo
     $this->addTextInput('titolo', translateFN('Titolo') . ':')->setRequired()->setValidator(FormValidator::NOT_EMPTY_STRING_VALIDATOR)->withData($this->data['titolo']);
     //descrizione
     $this->addTextarea('testo', translateFN('Descrizione') . ':')->withData(Node::prepareInternalLinkMediaForEditor($this->data['testo']));
     //consegna (message showed on test / survey ending)
     if (!empty($this->data['nome'])) {
         $defaultValue = Node::prepareInternalLinkMediaForEditor($this->data['consegna']);
     } else {
         $defaultValue = translateFN('Dati inviati correttamente.');
     }
     $this->addTextarea('consegna', translateFN('Messaggio finale') . ':')->withData($defaultValue);
     //return
     $options = array(ADA_NO_TEST_RETURN => translateFN('Non mostrare link'), ADA_NEXT_NODE_TEST_RETURN => translateFN('Mostra link al nodo successivo del corso'), ADA_INDEX_TEST_RETURN => translateFN('Mostra link all\'indice del corso'), ADA_COURSE_INDEX_TEST_RETURN => translateFN('Mostra link all\'elenco dei corsi'));
     if (isset($this->data['return'])) {
         $defaultValue = $this->data['return'];
     } else {
         $defaultValue = ADA_NO_TEST_RETURN;
     }
     $this->addSelect('return', translateFN('Link di ritorno') . ':', $options, $defaultValue);
     //ripetibile
     $radios = array(ADA_YES_TEST_REPETEABLE => translateFN('Si'), ADA_NO_TEST_REPETEABLE => translateFN('No'));
     if (isset($this->data['ripetibile'])) {
         $defaultValue = $this->data['ripetibile'];
     } else {
         $defaultValue = ADA_YES_TEST_REPETEABLE;
     }
     $this->addRadios('ripetibile', translateFN('Ripetibile dall\'utente') . ':', $radios, $defaultValue);
     //suddivisione in sessioni
     $radios = array(ADA_SEQUENCE_TEST_MODE => translateFN('Si'), ADA_ONEPAGE_TEST_MODE => translateFN('No'));
     if (isset($this->data['suddivisione'])) {
         $defaultValue = $this->data['suddivisione'];
     } else {
         $defaultValue = ADA_ONEPAGE_TEST_MODE;
     }
     $this->addRadios('suddivisione', translateFN('Suddividi per sessioni') . ':', $radios, $defaultValue);
     //feedback
     $options = array(ADA_CORRECT_TEST_INTERACTION => translateFN('Correzioni risposte e risposta corretta'), ADA_RATING_TEST_INTERACTION => translateFN('Correzioni risposte, punteggio ottenuto e risposta corretta'), ADA_FEEDBACK_TEST_INTERACTION => translateFN('Correzioni risposte'), ADA_BLIND_TEST_INTERACTION => translateFN('Nessun feedback'));
     if (isset($this->data['feedback'])) {
         $defaultValue = $this->data['feedback'];
     } else {
         $defaultValue = ADA_RATING_TEST_INTERACTION;
     }
     $this->addSelect('feedback', translateFN('Feedback all\'utente') . ':', $options, $defaultValue);
     //livello minimo
     if (isset($this->data['min_level'])) {
         $defaultValue = $this->data['min_level'];
     } else {
         $defaultValue = 0;
     }
     $this->addTextInput('min_level', translateFN('Livello minimo per accedere al test (0 = nessun limite)') . ':')->setRequired()->setValidator(FormValidator::NON_NEGATIVE_NUMBER_VALIDATOR)->withData($defaultValue);
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:60,代码来源:rootFormTest.inc.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addTextInput('username', translateFN('Username'))->setRequired()->setValidator(FormValidator::USERNAME_VALIDATOR);
     $this->addHidden('findByUsername');
     $this->addHidden('id_course_instance');
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:7,代码来源:UserFindForm.inc.php

示例8: __construct

 public function __construct($cod = FALSE, $action = NULL)
 {
     parent::__construct();
     if ($action != NULL) {
         $this->setAction($action);
     }
     $this->setName('registration');
     $this->addTextInput('nome', translateFN('Nome'))->setRequired()->setValidator(FormValidator::FIRSTNAME_VALIDATOR);
     $this->addTextInput('cognome', translateFN('Cognome'))->setRequired()->setValidator(FormValidator::LASTNAME_VALIDATOR);
     $this->addTextInput('birthdate', translateFN('Data di nascita'))->setRequired()->setValidator(FormValidator::DATE_VALIDATOR);
     $this->addTextInput('birthcity', translateFN('Comune o stato estero di nascita'))->setRequired()->setValidator(FormValidator::NOT_EMPTY_STRING_VALIDATOR);
     $this->addTextInput('birthprovince', translateFN('Provincia di nascita'));
     $this->addTextInput('email', translateFN('Email'))->setRequired()->setValidator(FormValidator::EMAIL_VALIDATOR);
     $this->addSelect('sesso', translateFN('Genere'), array('0' => translateFN('Scegli un genere'), 'M' => translateFN('Maschio'), 'F' => translateFN('Femmina')), '0');
     $this->addTextInput('matricola', translateFN('numero di matricola'));
     /*
     * 
            if ($cod) {
                $this->addTextInput('codice', translateFN('Codice'))
                     ->setRequired()
                     ->setValidator(FormValidator::NOT_EMPTY_STRING_VALIDATOR);
            }
     
     * 
     */
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:26,代码来源:UserRegistrationForm.inc.php

示例9: __construct

 function __construct(Widget $widgetObj)
 {
     $content = "<div id='{$widgetObj->generatedDIVId}' class='ADAwidget loading'>" . self::$placeholder . "</div>";
     if ($widgetObj->ajaxModule) {
         $replacement = translateFN('Loading') . '...';
         if (JQUERY_SUPPORT) {
             $ajax_content = "<script type='text/javascript'>\$j.get('{$widgetObj->ajaxModule}'";
             if (!empty($widgetObj->optionsArr)) {
                 $ajax_content .= ' ,' . json_encode($widgetObj->optionsArr);
             }
             $ajax_content .= ").done( function(html){ \t\t\t\t\n\t\t\t\t\$j('#{$widgetObj->generatedDIVId}').removeClass('loading');\n\t\t\t\t\$j('#{$widgetObj->generatedDIVId}').html(html);  } );</script>";
         } else {
             // prototype 1.6 version
             $ajax_content = "<script type='text/javascript'>\n\t\t\t\t\t\tnew Ajax.Request('" . $widgetObj->ajaxModule . "', {\n\t\t\t\t\t\t\t\tmethod: 'get',";
             if (!empty($widgetObj->optionsArr)) {
                 $ajax_content .= 'parameters: ' . json_encode($widgetObj->optionsArr) . ',';
             }
             $ajax_content .= "  onComplete: function(response) {\n\t\t\t\t\t\t\$('" . $widgetObj->generatedDIVId . "').removeClassName('loading');\n\t\t\t\t\t\t\$('" . $widgetObj->generatedDIVId . "').update (response.responseText);\n\t\t\t  }\n\t\t\t});\n\t\t\t</script>";
         }
     } else {
         $replacement = translateFN('widget content generator not found');
         $ajax_content = '';
     }
     $this->content = str_replace(self::$placeholder, $replacement, $content) . $ajax_content;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:25,代码来源:ajax_remote_class.inc.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addTextInput('username', translateFN('Username'))->setRequired()->setValidator(FormValidator::USERNAME_VALIDATOR);
     $this->addPasswordInput('password', translateFN('Password'))->setRequired()->setValidator(FormValidator::PASSWORD_VALIDATOR);
     $this->addHidden('performLogin');
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:7,代码来源:UserLoginForm.inc.php

示例11: content

 protected function content()
 {
     $this->setName('deleteForm');
     //cancella
     $radios = array(1 => translateFN('Si'), 0 => translateFN('No'));
     $this->addRadios('delete', $this->message, $radios, 0);
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:7,代码来源:deleteFormTest.inc.php

示例12: content

 protected function content()
 {
     $dh = $GLOBALS['dh'];
     $this->setName('switcherForm');
     //lista dei test presenti
     $test_list = $dh->test_getCourseTest(array('id_corso' => $this->id_course));
     //getting already present test list
     $test_ids = array();
     if (!empty($test_list)) {
         $checkboxes = array();
         foreach ($test_list as $v) {
             $checkboxes[$v['id_test']] = $v['titolo'];
             $test_ids[] = $v['id_test'];
         }
         $this->addCheckboxes('delete_test[]', translateFN('Seleziona i sondaggi da rimuovere dal corso') . ':', $checkboxes, null);
     }
     //lista dei test da aggiungere
     $tmp_tests = $dh->test_getNodes(array('id_nodo_parent' => null, 'tipo' => 'LIKE ' . ADA_TYPE_SURVEY . '%'));
     //getting available test
     $options = array('' => ' --- ');
     $empty = true;
     foreach ($tmp_tests as $v) {
         if (!in_array($v['id_nodo'], $test_ids)) {
             $options[$v['id_nodo']] = $v['titolo'];
             $empty = false;
         }
     }
     if ($empty) {
         $options = array('' => translateFN('Nessun questionario presente'));
         $empty = false;
     }
     if (!$empty) {
         $this->addSelect('id_test', translateFN('Seleziona il sondaggio da aggiungere al corso') . ':', $options, '');
     }
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:35,代码来源:switcherFormTest.inc.php

示例13: getAddExerciseForm

 public static function getAddExerciseForm($form_dataAr = array(), $errorsAr = array())
 {
     $form = CDOMElement::create('form', 'id:add_exercise, name:add_exercise, class:fec, method:post');
     $form->setAttribute('action', 'add_exercise.php?verify=1');
     //$form->setAttribute('onsubmit',"return checkNec();");
     $form->setAttribute('enctype', 'multipart/form-data');
     $parent_node = FormElementCreator::addTextInput('parent_node', 'Nodo parent', $form_dataAr, $errorsAr, '', true);
     $form->addChild($parent_node);
     $exercise_title = FormElementCreator::addTextInput('exercise_title', 'Titolo esercizio', $form_dataAr, $errorsAr, '', true);
     $form->addChild($exercise_title);
     $exercise_familyAr = array(ADA_STANDARD_EXERCISE_TYPE => translateFN('Multiple Choice'), ADA_OPEN_MANUAL_EXERCISE_TYPE => translateFN('Open with Manual Correction'), ADA_OPEN_AUTOMATIC_EXERCISE_TYPE => translateFN('Open with Automatic Correction'), ADA_OPEN_UPLOAD_EXERCISE_TYPE => translateFN('Open Manual + Upload'), ADA_CLOZE_EXERCISE_TYPE => translateFN('CLOZE'));
     $exercise_family = FormElementCreator::addSelect('exercise_family', 'Tipo di esercizio', $exercise_familyAr, $form_dataAr, $errorsAr, '', true);
     $form->addChild($exercise_family);
     $exercise_interactionAr = array(ADA_BLIND_EXERCISE_INTERACTION => translateFN('No Feedback'), ADA_FEEDBACK_EXERCISE_INTERACTION => translateFN('With Feedback'), ADA_RATING_EXERCISE_INTERACTION => translateFN('With Feedback and Rating'));
     $exercise_interaction = FormElementCreator::addSelect('exercise_interaction', 'Tipo di interazione', $exercise_interactionAr, $form_dataAr, $errorsAr, '', true);
     $form->addChild($exercise_interaction);
     $test_modeAr = array(ADA_SINGLE_EXERCISE_MODE => translateFN('Only One Exercise'), ADA_SEQUENCE_EXERCISE_MODE => translateFN('Next Exercise will be Shown'), ADA_RANDOM_EXERCISE_MODE => translateFN('A Random Picked Exercise will be Shown'));
     $test_mode = FormElementCreator::addSelect('test_mode', 'Modalità di esecuzione', $test_modeAr, $form_dataAr, $errorsAr, '', true);
     $form->addChild($test_mode);
     $test_simplificationAr = array(ADA_NORMAL_EXERCISE_SIMPLICITY => translateFN('Normal Exercise'), ADA_MEDIUM_EXERCISE_SIMPLICITY => translateFN('Medium Exercise'), ADA_SIMPLIFY_EXERCISE_SIMPLICITY => translateFN('Simplified Exercise'));
     $test_simplification = FormElementCreator::addSelect('test_simplification', "Semplicità dell'esercizio", $test_simplificationAr, $form_dataAr, $errorsAr, '', true);
     $form->addChild($test_simplification);
     $test_barrierAr = array(ADA_NO_EXERCISE_BARRIER => translateFN('No barrier'), ADA_YES_EXERCISE_BARRIER => translateFN('With barrier'));
     $test_barrier = FormElementCreator::addSelect('test_barrier', 'Con sbarramento', $test_barrierAr, $form_dataAr, $errorsAr, '', true);
     $form->addChild($test_barrier);
     $buttons = FormElementCreator::addSubmitAndResetButtons();
     $form->addChild($buttons);
     return $form;
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:29,代码来源:ServicesModuleHtmlLib.inc.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setName('EditranslatorForm');
     $this->addTextarea('TranslationTextArea', translateFN('Modifica traduzione'));
     $j = 'return saveTranslation()';
     $this->setOnSubmit($j);
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:8,代码来源:EditTranslationForm.inc.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->addTextInput('username', translateFN('Nome utente'))->setRequired()->setValidator(FormValidator::EMAIL_VALIDATOR);
     $this->addPasswordInput('password', translateFN('Password'))->setRequired()->setValidator(FormValidator::PASSWORD_VALIDATOR);
     $this->addPasswordInput('passwordcheck', translateFN('Conferma la password'))->setRequired()->setValidator(FormValidator::PASSWORD_VALIDATOR);
     $this->addSelect('tipo', translateFN('Tipo Utente'), array(0 => translateFN('Scegli il tipo...'), AMA_TYPE_AUTHOR => translateFN('Autore'), AMA_TYPE_STUDENT => translateFN('Studente'), AMA_TYPE_TUTOR => translateFN('Tutor'), AMA_TYPE_SUPERTUTOR => translateFN('Super Tutor')), 0)->setRequired()->setValidator(FormValidator::POSITIVE_NUMBER_VALIDATOR);
 }
开发者ID:eguicciardi,项目名称:ada,代码行数:8,代码来源:UserSubscriptionForm.inc.php


注:本文中的translateFN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。