[eluser]Ngulo[/eluser]
hi all i've $this->problem():
i want to includethe language file that are into language folder
i switch the file_name with a function :
Code:
function lingua()
{
$lingua_scelta= $this->uri->segment(3);
switch ($lingua_scelta)
{
case 'it':
$this->session->set_userdata('lingua','define_IT.php');
break;
case'en':
$this->session->set_userdata('lingua','define_EN.php');
break;
default:
$this->session->set_userdata('lingua','define_IT.php');
break;
}
i make this first on all my controllers to load the session or not_session name_file:
Code:
if
($this->session->userdata('lingua'))
{$this->load->file('language/'.$this->session->userdata('lingua'));}
else
{$this->load->file('language/define_IT.php');}
the problem is that i get this error:
Code:
An Error Was Encountered
Unable to load the requested file: define_EN
while the non_session name_file(define_IT.php) when the userdata('lingua') is FALSE
any suggestions?
thanks