Zend GetText and .mo.po Files

I inherited from an application created by a developer company, and I need to get the .mo and .po files generated for my site.

Here is what I have in bootstrap:

$translate = new Zend_Translate ('gettext', ROOT_PATH.'/languages/en/default.mo', 'en', array('disableNotices' => true)); $translate->setLocale($locale); 

I use the translation assistant wherever I need to customize the text on my website, but my .mo and .po files do not contain all the lines that are configured in my application.

Is there any command I need to run for gettext files to be populated?

Thanks!

+4
source share
1 answer

You can use Poedit and configure it to scan your sources (* .php and * .phtml) that are generated. po and .mo. Since I assume that you are already using Poedit to enter translations, you can also use its ability to scan source files and collect all translation lines from your code.

Here 's a good tutorial on setting up Poedit to recognize Zend Framework files and $this->translate('') commands from templates.

Good luck.

+8
source

Source: https://habr.com/ru/post/1394587/


All Articles