compared with
Current by Thomas Weidner
on Jan 13, 2008 04:35.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (13)

View Page History
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFDEV:Zend Proposal Zone Template}

{zone-data:component-name}

{zone-data:revision}
2.0 - 13 January 2008: Finished implementation
1.1 - 3 November 2007: Small adoptions
1.0 - 1 November 2007: Initial revision

{zone-data:overview}
Zend_View_Helper_Translate is an view helper for having easy and simple integration of Zend_Translate within the view. Included cousine is Zend_View_Helper__ which offers the shortcut possibility of "$this->_(xxx)" for integration... but this may break the coding standards and have to be cleared.
{zone-data}

{zone-data:milestones}
* Milestone 1: \[DONE\] [Proposal finished|http://framework.zend.com/wiki/display/ZFPROP/Zend_View_Helper_Translate+-+Thomas+Weidner]
* Milestone 3: Class integration
* Milestone 4: Unit tests
* Milestone 5: Documentation
* Milestone 2: \[DONE\] Class integration
* Milestone 3: \[DONE\] Unit tests
* Milestone 4: \[DONE\] Documentation
{zone-data}

{zone-data:class-list}
* Zend_View_Helper_Translate
* Zend_View_Helper__
{zone-data}

||UC-02||
// translation with one parameter from within the view
$this->_('Translate $this->translate('Translate this %1\$s', 'again');

||UC-03||
// translation with multiple parameters from within the view
$this->_('Translate $this->translate('Translate this %1\$s with %2\$s and %3\$s %4\%s', 'again', 'one', 'another', 10);

||UC-04||
// translation with multiple parameters from within the view
$this->_('Translate $this->translate('Translate this %1\$s with %2\$s and %3\$s %4\%s', array('again', 'one', 'another', 10));
{zone-data}


/**
* Ghostfunction for translate
*/
public function _($messageid);

/**
* Translates the given messageid
* Accepts multiple additional parameters, see use cases
public function translate($messageid);
}

class Zend_View_Helper__ extends Zend_View_Helper_Translate
{
/**
* Translates the given messageid
* Accepts multiple additional parameters, see use cases
*
* @param string $messageid The messageid to translate
* @throws Zend_Translate_Exception
* @returns string Translation
*/
public function _($messageid);
}
{code}
{zone-data}

{zone-template-instance}
{zone-template-instance}]]></ac:plain-text-body></ac:macro>