Translation view helper
category | Zend |
---|---|
package | Zend_View |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_View_Helper_Abstract |
__construct(\Zend_Translate|\Zend_Translate_Adapter $translate = null
)
\Zend_Translate
\Zend_Translate_Adapter
Instance of Zend_Translate
direct() : void
inherited_from | \Zend_View_Helper_Interface::direct() |
---|
getLocale() : string | \Zend_Locale
\Zend_View_Exception |
When no Zend_Translate instance was set |
---|
string
\Zend_Locale
getTranslator() : \Zend_Translate_Adapter | null
\Zend_Translate_Adapter
null
setLocale(string|\Zend_Locale $locale = null
) : \Zend_View_Helper_Translate
string
\Zend_Locale
New locale to set
\Zend_View_Exception |
When no Zend_Translate instance was set |
---|
\Zend_View_Helper_Translate
setTranslator(\Zend_Translate|\Zend_Translate_Adapter $translate) : \Zend_View_Helper_Translate
\Zend_Translate
\Zend_Translate_Adapter
Instance of Zend_Translate
\Zend_View_Exception |
When no or a false instance was set |
---|
\Zend_View_Helper_Translate
setView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
inherited_from | \Zend_View_Helper_Interface::setView() |
---|
\Zend_View_Interface
\Zend_View_Helper_Abstract
translate(string $messageid = null
) : string | \Zend_View_Helper_Translate
If you want to output another locale just set it as last single parameter Example 1: translate('%1\$s + %2\$s', $value1, $value2, $locale); Example 2: translate('%1\$s + %2\$s', array($value1, $value2), $locale);
string
Id of the message to be translated
string
\Zend_View_Helper_Translate
Translated message$view : \Zend_View_Interface
null
$_translator : \Zend_Translate_Adapter