Skip to content

Instantly share code, notes, and snippets.

@jagroop
Created March 13, 2018 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagroop/ed4b298373d346fc9f46dfe216300db5 to your computer and use it in GitHub Desktop.
Save jagroop/ed4b298373d346fc9f46dfe216300db5 to your computer and use it in GitHub Desktop.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class LanguageLoader {
public function initialize() {
$ci =& get_instance();
$ci->load->helper('language');
$siteLang = $ci->session->userdata('site_lang');
if ($siteLang) {
$ci->lang->load('information', $siteLang);
} else {
$ci->lang->load('information','english');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment