[eluser]LuckyFella73[/eluser]
Maybe there is something wrong with your languages files?
In system/languages I have two folders. The ci basic "english"
lang folder and for testing a additional "german" folder.
To check if all is working I placed a "test_lang.php" and
"test2_lang.php" file in both language folders.
In autoload.php I have:
Code:
$autoload['libraries'] = array('language');
# and
$autoload['language'] = array('test','test2');
My test-controller (the standard "welcome" slightly extended):
Code:
<?php
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
$this->lang->switch_to('german');
}
function index()
{
print_r($this->lang->is_loaded);
$this->load->view('welcome_message');
}
}
/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
In my config.php I have defined "english" as the standard language,
so I can test with switching to german in the controller. I just wanted
to get this to work, so I just edited the welcome controller ...
In my view I have:
Code:
<?php echo($this->lang->line('test_say'));?>
So I can see if the right string comes out.
Hope you get it to run as well!
EDIT:
PS: I didn't change anything in the My_language class - took it like xwero posted