Class Zend_View_Helper_Translate

Description

Translation view helper

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /View/Helper/Translate.php (line 37)

Zend_View_Helper_Abstract
   |
   --Zend_View_Helper_Translate
Variable Summary
Method Summary
Variables
Zend_Translate_Adapter $_translator (line 44)

Translation object

  • access: protected

Inherited Variables

Inherited from Zend_View_Helper_Abstract

Zend_View_Helper_Abstract::$view
Methods
Constructor __construct (line 51)

Constructor for manually handling

  • access: public
Zend_View_Helper_Translate __construct ([Zend_Translate|Zend_Translate_Adapter $translate = null])
getLocale (line 168)

Returns the set locale for translations

  • throws: Zend_View_Exception When no Zend_Translate instance was set
  • access: public
string|Zend_Locale getLocale ()
getTranslator (line 129)

Retrieve translation object

  • access: public
Zend_Translate_Adapter|null getTranslator ()
setLocale (line 148)

Set's an new locale for all further translations

  • throws: Zend_View_Exception When no Zend_Translate instance was set
  • access: public
Zend_View_Helper_Translate setLocale ([string|Zend_Locale $locale = null])
setTranslator (line 108)

Sets a translation Adapter for translation

  • throws: Zend_View_Exception When no or a false instance was set
  • access: public
translate (line 68)

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);

  • return: Translated message
  • access: public
string|Zend_View_Helper_Translate translate ([string $messageid = null])
  • string $messageid: Id of the message to be translated

Inherited Methods

Inherited From Zend_View_Helper_Abstract

 Zend_View_Helper_Abstract::direct()
 Zend_View_Helper_Abstract::setView()

Documentation generated on Mon, 21 Jun 2010 15:49:54 -0400 by phpDocumentor 1.4.3