Welcome Guest, Not a member yet? Register   Sign In
how to set/overwrite the config-item for "language" pre controller?
#3

[eluser]uprocka[/eluser]
Thanks for the push in the right direction!

See, I was so focused on doing it with hooks or the Cotroller Class that I forgot about the Config Class.

I extended the Config Class now and it works like a charme!!! Additionally the code even got shorter!

PS:
yes I think I extended the Controller right:

Code:
class MY_Controller extends Controller
{
   function MY_Controller()
   {
      parent::Controller();
      $this->config->set_item('language', 'spanish');
      
   }


but somehow this gets overridden by the default value again - I don't know when the default config gets loaded but obviously later. Perhaps a CI-Professional can explain that...?


Messages In This Thread
how to set/overwrite the config-item for "language" pre controller? - by El Forum - 07-03-2009, 09:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB