[eluser]maesk[/eluser]
No need to unload the "old" language. As mantis said, maybe autoload.php could be the problem. Another problem could be that your $_new_language isn't actually set to "bg".
From the user guide:
Quote:Code:
$this->lang->load('filename', 'language');
Where filename is the name of the file you wish to load (without the file extension), and language is the language set containing it (ie, english). If the second parameter is missing, the default language set in your application/config/config.php file will be used.
So your Bulgarian text file has to be in a folder called 'bulgarian' the way you load it, otherwise CI will not find it and load the default English.
You could also store your language files like this:
system/application/language/en/texts_lang.php
system/application/language/bg/texts_lang.php
and then load it like this:
Code:
//Loading the language file
$this->lang->load('texts', $_new_language);
}
No need for a switch statement.