Class Zend_View_Helper_Translate

Description

Translation view helper

  • copyright: Copyright (c) 2005-2008 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
 Zend_View_Helper_Translate __construct ([Zend_Translate|Zend_Translate_Adapter $translate = null])
 Zend_View_Helper_Translate setLocale ([string|Zend_Locale $locale = null])
 string translate ([string $messageid = null])
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 131)

Retrieve translation object

If none is currently registered, attempts to pull it from the registry using the key 'Zend_Translate'.

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

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

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 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 Fri, 08 Jan 2010 16:31:33 -0500 by phpDocumentor 1.4.3