Description ¶
Extension automatically collected all messages which used in current page and register to view.
window.messages = {"\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a":"monday","\u0432\u0442\u043e\u0440\u043d\u0438\u043a":"tuesday"} // etc.
after that u call Yii.t or _t js-method with your message.
Requirements ¶
Yii 1.1 or above
Usage ¶
Yii.t('any words');
_t('any words');
Add import path and override CPhpMessageSource in main.php ¶
'import' => array(
// ...
'ext.yii-js-t.*',
// ...
)
'components' => array(
// ...
'messages' => array(
'class' => 'JsTPhpMessageSource'
),
// ...
),
...
Override Controller from JsTController
Links ¶
github: click
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.