Welcome Guest, Not a member yet? Register   Sign In
Language selection problem
#3

[eluser]pickupman[/eluser]
[quote author="Joseph Wensley" date="1292624535"]Instead of autoloading you could use $this->lang->load('filename', 'lang');[/quote]

To be a little more complete:
Code:
class MY_Controller extends Controller{

   public function __construct(){
      parent::__construct();

      $language = $this->session->userdata('language'); //set this session var using a dropdown/link
      $language = (!empty($language)) ? $language : 'english'; //set fallback to english to next line doesn't break
      $this->load->lang('filename', $language);
      
   }

}


Messages In This Thread
Language selection problem - by El Forum - 12-17-2010, 10:08 AM
Language selection problem - by El Forum - 12-17-2010, 10:22 AM
Language selection problem - by El Forum - 12-17-2010, 11:03 AM
Language selection problem - by El Forum - 12-18-2010, 01:41 AM
Language selection problem - by El Forum - 12-18-2010, 08:10 AM
Language selection problem - by El Forum - 12-20-2010, 02:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB