Welcome Guest, Not a member yet? Register   Sign In
Language class problem *solved*
#1

[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




Theme © iAndrew 2016 - Forum software by © MyBB