Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Not an Issue
-
Affects Version/s: 1.9.3
-
Fix Version/s: 1.9.4
-
Component/s: Zend_Translate, Zend_View
-
Labels:None
Description
Hi,
I noticed that I can use Zend_Translate set via Zend_Application_Resource_Translate in an action controller like this:
$translate = Zend_Registry::get('Zend_Translate');
$translate->_('Translate this');
The _('Translate this') is getting picked up by poedit.
Now in a view script with the Zend_View_Helper_Translate according to the manual translating should look like this:
<?= $this->translate('Translate this') ?>
But this doesn't get picked up by poedit because it doesn't have _('Translate this').
I got it working like this:
<?= $this->translate()->getTranslator()->_('Translate this') ?>
I think it would be easier and neater if the Zend_View_Helper_Translate could be used in the same way as Zend_Translate.
Something like this:
<?= $this->translate->_('Translate this') ?>
This is a simple configuration issue of poEdit and not one of ZF.
Tell your parser to search for translate( additionally to _(.