using yii command extract message which need i18n
first you should create a config file for yii command:
.\yii message/config-template path/to/config.php`
such as messages/config.php
made some modify to satisfy you needs
then run yii command to extract message from you php file or html file:
.\yii message messages\config.php
then translate you message to you needed language under messages/language-ID
dir