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


PHP Zend_Translate_Adapter::_方法代码示例

本文整理汇总了PHP中Zend_Translate_Adapter::_方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Translate_Adapter::_方法的具体用法?PHP Zend_Translate_Adapter::_怎么用?PHP Zend_Translate_Adapter::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Translate_Adapter的用法示例。


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

示例1: _

 /**
  * Copy from \Zend_Translate_Adapter
  *
  * Translates the given string
  * returns the translation
  *
  * @param  string             $text   Translation string
  * @param  string|\Zend_Locale $locale (optional) Locale/Language to use, identical with locale
  *                                    identifier, @see \Zend_Locale for more information
  * @return string
  */
 public function _($text, $locale = null)
 {
     if (!$this->translateAdapter) {
         $this->initTranslateable();
     }
     return $this->translateAdapter->_($text, $locale);
 }
开发者ID:GemsTracker,项目名称:gemstracker-library,代码行数:18,代码来源:JoinModel.php

示例2: _

 /**
  * proxy for easy access to translations
  *
  * @param  string             $messageId Translation string
  * @param  string|\Zend_Locale $locale    (optional) Locale/Language to use, identical with locale
  *                                       identifier, @see \Zend_Locale for more information
  * @return string
  */
 private function _($messageId, $locale = null)
 {
     if ($this->translate) {
         return $this->translate->_($messageId, $locale);
     }
     return $messageId;
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:15,代码来源:TemplateModel.php

示例3: afterRegistry

 public function afterRegistry()
 {
     parent::afterRegistry();
     $this->setIfExists('gof_form_id', 'label', $this->translate->_('FormID'));
     $this->setIfExists('gof_form_version', 'label', $this->translate->_('Version'));
     $this->setIfExists('gof_form_title', 'label', $this->translate->_('Name'));
     $this->setIfExists('gof_form_active', 'label', $this->translate->_('Active'), 'elementClass', 'checkbox');
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:8,代码来源:OpenRosaFormModel.php

示例4: _addElementPerson

 private function _addElementPerson()
 {
     $translate = Zend_Registry::get("Zend_Translate");
     $url = new Zend_View_Helper_Url();
     $urlSearch = $url->url(array('module' => 'persons', 'controller' => 'person', 'action' => 'search-form'), null, true);
     $urlNew = $url->url(array('module' => 'persons', 'controller' => 'person', 'action' => 'create'), null, true);
     $append = '';
     if ($this->_action == self::ACTION_ADD) {
         $append .= '<a id="btnPersonSearch" href="' . $urlSearch . '" ' . ' rel="colorbox-search" search-return-id="id" search-return-value="person_name">' . '<i class="icon-search" rel="tooltip" data-original-title="' . $this->translate->_("Search person") . '"></i>' . '</a>';
     }
     $this->addElement('text', 'person_name', array('label' => 'Person', 'value' => $this->_model ? $this->_model->getPerson()->getName() : '', 'dimension' => 6, 'disabled' => true, 'placeholder' => $translate->_('Use the links aside to search a person or create a new one'), 'append' => $append . ' | ' . '<a class="hide" id="btnPersonDetails" href="#" rel="colorbox-details">' . $this->translate->_("Details") . '</a>' . ' | ' . '<a class="hide" id="btnPersonCreate" href="' . $urlNew . '" rel="colorbox">' . '<i class="icon-plus-sign" rel="tooltip" data-original-title="' . $this->translate->_("Add new") . ' ' . $this->translate->_("person") . '"></i>' . '</a>'));
 }
开发者ID:brunopbaffonso,项目名称:ongonline,代码行数:12,代码来源:Employee.php

示例5: getConfigModel

 /**
  * Get a model to store the config
  *
  * @param boolean $valueMask MAsk the password or if false decrypt it
  * @return \Gems_Model_JoinModel
  */
 protected function getConfigModel($valueMask = true)
 {
     if (!$this->_configModel) {
         $model = new \MUtil_Model_TableModel('gems__radius_config', 'config');
         // $model = new \Gems_Model_JoinModel('config', 'gems__radius_config', 'grcfg');
         $model->setIfExists('grcfg_ip', 'label', $this->translate->_('IP address'), 'required', true);
         $model->setIfExists('grcfg_port', 'label', $this->translate->_('Port'), 'required', true);
         $model->setIfExists('grcfg_secret', 'label', $this->translate->_('Shared secret'), 'description', $this->translate->_('Enter only when changing'), 'elementClass', 'password', 'required', false, 'repeatLabel', $this->translate->_('Repeat password'));
         $type = new \Gems_Model_Type_EncryptedField($this->project, $valueMask);
         $type->apply($model, 'grcfg_secret', 'grcfg_encryption');
         $this->_configModel = $model;
     }
     return $this->_configModel;
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:20,代码来源:RadiusUserDefinition.php

示例6: _addElementHomeType

 private function _addElementHomeType()
 {
     $this->addElement('radio', 'home_type_choice', array('label' => 'Home type', 'value' => $this->_model ? $this->_model->getHome_type() : NULL, 'dimension' => 2, 'rel' => 'choice-for-another-element', 'data-target' => '#home_type'));
     $el = $this->getElement('home_type_choice');
     $ops = Persons_Model_Home::toArrayType();
     foreach ($ops as $key => $value) {
         $ops[$key] = $this->translate->_($value);
     }
     sort($ops);
     foreach ($ops as $op) {
         $el->addMultiOption($op, $op);
     }
     $el->addMultiOption('', 'another');
     $this->addElement('text', 'home_type', array('label' => 'Home type', 'value' => $this->_model ? $this->_model->getHome_type() : '', 'dimension' => 6, 'required' => true, 'validators' => array(array('StringLength', false, array(0, isset($options['maxlength']) ? $options['maxlength'] : 50))), 'maxlength' => 50, 'readonly' => true));
 }
开发者ID:brunopbaffonso,项目名称:ongonline,代码行数:15,代码来源:PersonHelped.php

示例7: _

 /**
  * Proxy to the translate object
  *
  * @param string $messageId
  * @param type $locale
  * @return string
  */
 protected function _($messageId, $locale = null)
 {
     return $this->translate->_($messageId, $locale);
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:11,代码来源:UpgradesAbstract.php

示例8: _

 /**
  * Copy from \Zend_Translate_Adapter
  *
  * Translates the given string
  * returns the translation
  *
  * @param  string             $text   Translation string
  * @param  string|\Zend_Locale $locale (optional) Locale/Language to use, identical with locale
  *                                    identifier, @see \Zend_Locale for more information
  * @return string
  */
 public function _($text, $locale = null)
 {
     return $this->translateAdapter->_($text, $locale);
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:15,代码来源:Action.php

示例9: getAvailableStaffDefinitions

 /**
  * Get userclass / description array of available UserDefinitions for staff
  *
  * @return array
  */
 public function getAvailableStaffDefinitions()
 {
     $definitions = array(self::USER_STAFF => $this->translate->_('Db storage'), 'RadiusUser' => $this->translate->_('Radius storage'));
     return $definitions;
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:10,代码来源:UserLoader.php

示例10: setDutchZipcode

 /**
  * Set the field values for a dutch zipcode
  *
  * @param \MUtil_Model_ModelAbstract $model
  * @param \Zend_Translate_Adapter $translator
  * @param string $fieldName
  */
 public static function setDutchZipcode(\MUtil_Model_ModelAbstract $model, \Zend_Translate_Adapter $translator, $fieldName = 'grs_zipcode')
 {
     $model->set($fieldName, 'size', 7, 'description', $translator->_('E.g.: 0000 AA'), 'filter', new \Gems_Filter_DutchZipcode());
 }
开发者ID:harmslijper,项目名称:gemstracker-library,代码行数:11,代码来源:RespondentNlModel.php


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