當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Languages::getLanguageFiles方法代碼示例

本文整理匯總了PHP中Languages::getLanguageFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Languages::getLanguageFiles方法的具體用法?PHP Languages::getLanguageFiles怎麽用?PHP Languages::getLanguageFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Languages的用法示例。


在下文中一共展示了Languages::getLanguageFiles方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public function init()
 {
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $this->addElement('select', 'locale', array('decorators' => array('Bootstrap'), 'label' => 'Language', 'class' => 'form-control', 'multioptions' => Languages::getLanguageFiles(PUBLIC_PATH . "/languages")));
     $this->addElement('textarea', 'agreement', array('filters' => array('StringTrim'), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'label' => 'Agreements', 'rows' => '10', 'value' => Shineisp_Commons_Utilities::readfile(PUBLIC_PATH . "/../LICENSE")));
     $this->addElement('select', 'chkagreement', array('decorators' => array('Bootstrap'), 'label' => 'I agree with the legal terms', 'class' => 'form-control', 'multioptions' => array(1 => 'YES, I agree with the legal terms', 0 => 'NO, I disagree with these legal terms')));
     $this->addElement('submit', 'submit', array('label' => 'Continue', 'decorators' => array('Bootstrap'), 'class' => 'btn btn-primary btn-lg'));
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:8,代碼來源:LocalizationForm.php

示例2: init

 public function init()
 {
     // Set the custom decorator
     $this->addElementPrefixPath('Shineisp_Decorator', 'Shineisp/Decorator/', 'decorator');
     $translate = Shineisp_Registry::get('Zend_Translate');
     $this->addElement('text', 'language', array('filters' => array('StringTrim'), 'required' => true, 'label' => $translate->_('Language'), 'description' => $translate->_('Set the name of the language'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('text', 'locale', array('filters' => array('StringTrim'), 'label' => $translate->_('Locale'), 'description' => $translate->_('Write here the name of the locale (eg. en_US).'), 'decorators' => array('Bootstrap'), 'class' => 'form-control'));
     $this->addElement('select', 'code', array('filters' => array('StringTrim'), 'label' => $translate->_('Code'), 'description' => $translate->_('Write here the name of the locale (eg. en). '), 'decorators' => array('Bootstrap'), 'class' => 'form-control', 'multioptions' => Languages::getLanguageFiles()));
     $this->addElement('checkbox', 'active', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Active'), 'class' => 'form-control'));
     $this->addElement('select', 'base', array('decorators' => array('Bootstrap'), 'label' => $translate->_('Base'), 'class' => 'form-control', 'description' => $translate->_('Set the main translation language'), 'multioptions' => array(0 => 'NO', 1 => 'YES, It is the default language')));
     $this->addElement('hidden', 'language_id');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:12,代碼來源:LanguagesForm.php


注:本文中的Languages::getLanguageFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。