Public Member Functions | |
__construct ($translate=null) | |
translate ($messageid=null) | |
setTranslator ($translate) | |
getTranslator () | |
setLocale ($locale=null) | |
getLocale () | |
Protected Attributes | |
$_translator |
Definition at line 37 of file Translate.php.
__construct | ( | $ | translate = null ) |
Constructor for manually handling
Zend_Translate | Zend_Translate_Adapter | $translate | Instance of Zend_Translate |
Definition at line 51 of file Translate.php.
getLocale | ( | ) |
Returns the set locale for translations
Zend_View_Exception | When no Zend_Translate instance was set |
Definition at line 168 of file Translate.php.
getTranslator | ( | ) |
Retrieve translation object
If none is currently registered, attempts to pull it from the registry using the key 'Zend_Translate'.
Definition at line 131 of file Translate.php.
setLocale | ( | $ | locale = null ) |
Set's an new locale for all further translations
string | Zend_Locale | $locale | New locale to set |
Zend_View_Exception | When no Zend_Translate instance was set |
Definition at line 150 of file Translate.php.
setTranslator | ( | $ | translate ) |
Sets a translation Adapter for translation
Zend_Translate | Zend_Translate_Adapter | $translate | Instance of Zend_Translate |
Zend_View_Exception | When no or a false instance was set |
Definition at line 109 of file Translate.php.
translate | ( | $ | messageid = null ) |
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);
string | $messageid | Id of the message to be translated |
Definition at line 68 of file Translate.php.