<?php
    if (!defined('BASEPATH')) exit('No direct script access allowed');
    class Language extends CI_Controller {
        function __construct() {
            parent::__construct();
            $this->load->model('settings/users_model');
        }
        function setLanguage($lang='',$langfolder='') {
            $newdata = array(
                'lang'  => $lang,
                'langfolder'  => $langfolder
            );
            $this->session->set_userdata($newdata); 
            redirect($this->input->get('last_url'));
        }
    }