<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class ChangeLanguage extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this->load->library('layouts');
        checkFront();
    }

	public function language($lang = "en")
    {
    	
		$referer = urlencode($_SERVER['HTTP_REFERER']);
		$this->session->set_userdata('language', $lang);
		redirect(urldecode($referer), 'refresh');
		
    }
   

}

?>
