[eluser]dinisptc[/eluser]
i am using a diferent method for language using require_once
the problem its that if i set this on the controller constructor it wont work
only works on the view , the problem is that i have to set this code on every view
Code:
$lang = $this->session->userdata('lang_name');
// print_r($lang);
if(!isset($lang) or $lang==false)
{
// print_r('no lang'.$lang);
require_once APPPATH.'lang_crm/en.php';
}
if($lang=='english')
{ //load default language
require_once APPPATH.'lang_crm/en.php';
}
elseif($lang=='french')
{ //load language from session
require_once APPPATH.'lang_crm/fr.php';
}
elseif($lang=='italian')
{ //load language from session
require_once APPPATH.'lang_crm/it.php';
}
elseif($lang=='german')
{ //load language from session
require_once APPPATH.'lang_crm/de.php';
}
?>