[eluser]P.T.[/eluser]
Hello all,
First of all, thanks for the wonderfull framework!
I am still learning the framework, but it works really nice
Now, i got a question. I created my own way to handle language files. I save the language in a session called 'language'.
Now i want that session to be loaded in the loader.php file where the standard language files are autoloaded.
Since languages files are loaded before libraries, I cut the language loading part and placed it right below the libraries loading part.
Code:
// Load all other libraries
foreach ($autoload['libraries'] as $item)
{
$this->library($item);
}
if (isset($autoload['language']) AND count($autoload['language']) > 0)
{
//log_message("DEBUG", "Loading language files...");
$this->language($autoload['language'], 'english');
}
'english' should be replaced here with the language session.
I tried something like this:
$language = MY_Session::userdata('language');
But I retrieve an empty / false variable.
But if I am correct, the sessions are already loaded and ready for use.
Any idea what I am doing wrong or any idea how I could fix this? Or am i doing something stupid?
(By the way, i know that their is a standard language thingy around. Which adds something to your URL, but that's not what we want.)