I have a web site with two languages, it works in localhost perfect. but when I run it on a production enviroment and people try to change the language doesn't work, they need to press F5 key in the browser,so then the site reload in the language they choose. Any idea?? Thanks...
public function __construct()
{
parent::__construct();
$this->lang->load('navmenu', $this->session->userdata('language'));
$this->lang->load('search', $this->session->userdata('language'));
$this->lang->load('home', $this->session->userdata('language'));
}
/.../
function ChangeLanguage ($lang)
{
$this->session->set_userdata('language', $lang);
redirect(base_url());
}
anchor('lang/changelanguage/spanish','Español')
anchor('lang/changelanguage/english','English')