How to config messages folder path?
Page 1 of 1
How to config messages folder path? How to config messages folder path?
#2
Posted 18 June 2010 - 07:39 AM
The message source path can be configured with Yii::app()->message->basePath (see CPhpMessageSource)
Or in config/main.php
You have to adjust your config/message.php accordingly
Or in config/main.php
'message'=>array('basePath'=>'yourPath')
You have to adjust your config/message.php accordingly
#3
Posted 19 June 2010 - 10:35 PM
zaccaria, on 18 June 2010 - 07:39 AM, said:
The message source path can be configured with Yii::app()->message->basePath (see CPhpMessageSource)
Or in config/main.php
You have to adjust your config/message.php accordingly
Or in config/main.php
'message'=>array('basePath'=>'yourPath')
You have to adjust your config/message.php accordingly
Thx, but not solved, message is readonly.
#4
Posted 05 December 2012 - 04:59 AM
The key "message" is not readonly, it's simply wrong.
Instead of "message" try "messages". And it has to be within "components". So it look likes this:
Instead of "message" try "messages". And it has to be within "components". So it look likes this:
'components' => array(
'messages'=>array('basePath'=>'yourPath'),
),
#5
Posted 07 February 2013 - 01:22 AM
Please set the path of messages using ALIAS like :
Here getPathOfAlias('application.messages') will return path/to/webroot/project-folder-if/protected/messages
Please refer to the Yii Guide for more information about path aliases
You could give path directly instead of using Yiibase::getPathOfAlias(...) using php
dirname function but it will not be flexible if you change the location of your application.
Hope this will help!
'components' => array(
'messages'=>array('basePath'=>Yiibase::getPathOfAlias('application.messages')),
),Here getPathOfAlias('application.messages') will return path/to/webroot/project-folder-if/protected/messages
Please refer to the Yii Guide for more information about path aliases
You could give path directly instead of using Yiibase::getPathOfAlias(...) using php
dirname function but it will not be flexible if you change the location of your application.
Hope this will help!
Share this topic:
Page 1 of 1

Help













