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
Details__construct(
Zend_Translate|Zend_Translate_Adapter $translate
=
null
)
:
Constructor for manually handling
DetailsgetLocale(
)
:
string|Zend_LocaleReturns the set locale for translations
DetailsgetTranslator(
)
:
Zend_Translate_Adapter|nullRetrieve translation object
DetailssetLocale(
string|Zend_Locale $locale
=
null
)
:
Zend_View_Helper_TranslateSet's an new locale for all further translations
DetailssetTranslator(
Zend_Translate|Zend_Translate_Adapter $translate
)
:
Zend_View_Helper_TranslateSets a translation Adapter for translation
Detailstranslate(
string $messageid
=
null
)
:
string|Zend_View_Helper_TranslateTranslate 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);
Details