« Return to Thread: How to generate a gettext source file

How to generate a gettext source file

by Vincent T :: Rate this Message:

Reply to Author | View in Thread


Hello,

First of all: I'm completely new to generating gettext source files and relatively new to the Zend Framework and OOP too.

I currently use revision 7199 if it's of any relevance.

Now, I've made a view helper to return a Zend_Translate object, see below.
Then in my view file I call "echo $this->translate()->_('Test');". Now I want to generate a source file using poEdit, however, it doesn't seem to find any strings. What am I doing wrong?

My view helper:

class Zend_View_Helper_Translate
{
    public static $translate;

    public function translate()
    {
        if(!isset($this->translate))
        {
            $i18nConfig = new Zend_Config_Ini('application/config.ini', 'i18n');
            $this->translate = new Zend_Translate('gettext', $i18nConfig->path, 'en');
        }
        return $this->translate;
    }
}


Thanks in advance,
--
Vincent

 « Return to Thread: How to generate a gettext source file

LightInTheBox - Buy quality products at wholesale price!