You can now directly set and get the config value of Kohana by this way:
Set Config value in Kohana:
Kohana::config_set(filename.variablename, value);
for example:
suppose we want to change language from Danish to English
Kohana::config_set(‘locale.language’, array(‘en-us’,'United States’));
here locale is config filename while language is variable which lies in locale.php. You can set value in both array and string.
Get Config value in Kohana:
Kohana::config(filename.variablename);
for example:
To get current language then we use below script
Kohana::config(‘locale.language’);
Hi Ravi,
Looks good. Keep it up and make this wiki powerful.
Madhav
Hi Ravi,
Thanks for this information.
I got the help from your post how to get and set the config value in kohana.
Pallavi