How can I generate .po file for translation?
If I run "yiic messages…" there are only some generated php files. In my application config I have the following:
'messages'=>array(
'class' => 'CGettextMessageSource',
'catalog' => 'mycatalog'
),
How can I generate .po file for translation?
If I run "yiic messages…" there are only some generated php files. In my application config I have the following:
'messages'=>array(
'class' => 'CGettextMessageSource',
'catalog' => 'mycatalog'
),
Any suggestions, how to collect translations from php code to a .po file?
Sorry, I do not know the answer to this question.
But I do it the old fashioned way. I replace whatever I need translation with [color=orange]Yii::t[/color]('[color=blue]path to translation file[/color]','[color=red]string to be translated[/color]').
I wish somebody can come up a better method.
I wrote this script to generate a POT file. I have it in /protected/generate-pot.php. The output file needs to exist before you run the script, just create an empty file (messages.pot in /messages [alongside /protected] by default).
_da.
an indirect way is to transform PHP files to PO files, and then transform PO files to PHP files :
Maybe adapting my script to darkangel’s one we could get something nice.
Edit 11-11-2009: Recover the link