Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Translation view helper
Zend_Translate_Adapter $_translator = ''
Translation object
__construct(
Zend_Translate|Zend_Translate_Adapter $translate
=
null
)
:
Constructor for manually handling
getLocale(
)
:
string|Zend_Locale
Returns the set locale for translations
getTranslator(
)
:
Zend_Translate_Adapter|null
Retrieve translation object
setLocale(
string|Zend_Locale $locale
=
null
)
:
Zend_View_Helper_Translate
Set's an new locale for all further translations
setTranslator(
Zend_Translate|Zend_Translate_Adapter $translate
)
:
Zend_View_Helper_Translate
Sets a translation Adapter for translation
translate(
string $messageid
=
null
)
:
string|Zend_View_Helper_Translate
Translate a message You can give multiple params or an array of params.
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);