Welcome Guest, Not a member yet? Register   Sign In
i am trying to change languages with ion_auth
#1

[eluser]dinisptc[/eluser]
i am trying to change languages with ion_auth

i have also ion auth on autoload

$autoload['language'] = array('ion_auth');

Code:
public function french()
{
$this->session->set_userdata('lang_name','french');
  redirect('/', 'refresh');

}

public function english()
{
$this->session->set_userdata('lang_name','english');

  redirect('/', 'refresh');
}


this its the code on the constructor of user controller :

Code:
$lang = $this->session->userdata('lang_name');
        if(!isset($lang))
        { //load default language
          $this->lang->load('user');
          $this->lang->load('ion_auth');
        }
        else
        { //load language from session
          print_r('lang :'.$this->session->userdata('lang_name'));
          $this->lang->load('user',$this->session->userdata('lang_name'));
          $this->lang->load('ion_auth',$this->session->userdata('lang_name'));
        }

its not working the other language files are working properly but the ion_auth its not working


thanks




Theme © iAndrew 2016 - Forum software by © MyBB