本文整理匯總了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);
}