<?php
  class MultiLanguageLoader
  {
      function initialize() {
          $ci =& get_instance();
          $setting = get_setting();
          // load language helper
          $ci->load->helper('language');
          $siteLang = $ci->session->userdata('site_lang');
          if ($siteLang) {
              // difine all language files
              $ci->lang->load('content',$siteLang);
          } else {
              // default language files
              $ci->lang->load('content', $setting['language']);
          }
      }
  }
  

  ?>