CodeIgniter Forums
Language class problem *solved* - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Language class problem *solved* (/thread-30045.html)



Language class problem *solved* - El Forum - 04-30-2010

[eluser]rockoo[/eluser]
Hi,

I have a strange issue trying to use language files.

My problem is this:

I have two directories English and Slovene and both contain site_lang.php files.
Now I have set slovene as the default language in the config. In template I call $this->lang->line('item') where ever necessary.

Now when I load the site I get an error 'Unable to load the requested language file: language/slovene/_lang.php'

If I set site language file to load in autoload then file gets loaded but if I use $this->lang->load('site'), no matter where In controller, in view, etc. I get that error.

I have no idea why it does not put file name before the _lang...

Now when I load the language file with autoload I cant set any other language. Even if I put $this->lang->load('site', 'english') I still get the default language set in config file... Also if I do change default lang file in config i.e. english with site loaded in autoload it works ok...

I have no idea what is up.

/* UPDATE */
I managed to solve the problem by creating and autoloading bogus language file and then loading the correct lang file through $this->lang->load();

/////////////////////////////////////////////////////////////


Can you please help me

Thank you