本文整理汇总了PHP中Zend_Translate_Adapter::addTranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Translate_Adapter::addTranslation方法的具体用法?PHP Zend_Translate_Adapter::addTranslation怎么用?PHP Zend_Translate_Adapter::addTranslation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Translate_Adapter
的用法示例。
在下文中一共展示了Zend_Translate_Adapter::addTranslation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addTranslation
/**
* Add translations
*
* This may be a new language or additional content for an existing language
* If the key 'clear' is true, then translations for the specified
* language will be replaced and added otherwise
*
* @param array|Zend_Config $options Options and translations to be added
* @throws Zend_Translate_Exception
* @return Zend_Translate_Adapter Provides fluent interface
*/
public function addTranslation($options = array())
{
$tempOptions = $options;
foreach ($tempOptions['content'] as $content) {
$options['content'] = $content;
parent::addTranslation($options);
}
return $this;
}
示例2: addTranslation
/**
* Add translation data.
*
* It may be a new language or additional data for existing language
* If $clear parameter is true, then translation data for specified
* language is replaced and added otherwise
*
* @param string|array $data Translation data
* @param string|Zend_Locale $locale Locale/Language to add to this adapter
* @param array $options OPTIONAL Options to use
*/
public function addTranslation($data, $locale, array $options = array())
{
$this->_adapter->addTranslation($data, $locale, $options);
}
示例3: addTranslation
/**
* Add translation data.
*
* It may be a new language or additional data for existing language
* If $clear parameter is true, then translation data for specified
* language is replaced and added otherwise
*
* @param string|array $options Option for this adapter, depends on the adapter
* @param string|Zend_Locale $locale Locale/Language to add to this adapter
* @param boolean $clear If true the new translation is added to the existing one
*/
public function addTranslation($options, $locale, $clear = false)
{
$this->_adapter->addTranslation($options, $locale, $clear);
}