I am interested to know is there a script or otherway available to collect and generate Yii translation messages in a controller/project
Eg. If I have the following codes in a controller
Yii::t('blog', 'Your name');
Yii::t('category', 'Category name');
It should generate English translation message files as blog.php and category.php with above strings in messages directory. Please let me know if somebody knows a way. Thanks
There’s no need to reinvent the wheel. You can use
yiicfor that (if you go to the framework folder and type inyiic help messageyou will get all the info to need about it’s usage). For convenience, I’m going to paste it here.You should modify (and move) the example config file and you’re all set. Be sure to use full paths (ie.
C:\path\to\projecton Windows or/var/www/your/projecton *nix)