Created
March 12, 2012 09:09
-
-
Save ceesvanegmond/2020828 to your computer and use it in GitHub Desktop.
PHP: CodeIgniter Language Change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Language extends CI_Controller | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
is_logged_in(); | |
} | |
public function index($lang) | |
{ | |
$this->session->set_userdata('lang', $lang); | |
$this->load->helper('url'); | |
redirect('/admin/page/index/', 'refresh'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment