![]() |
multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" (/showthread.php?tid=56953) |
multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" - El Forum - 02-02-2013 [eluser]dinisptc[/eluser] multilanguage codeigniter /application/language/french/ user_lang.php i have a language file in french $lang['login_login'] = 'Connecté'; /application/language/french/ user_lang.php i have a language file in english $lang['login_login'] = 'Login'; at the user controller at the constructor i loaded the following $this->load->helper('url'); $this->load->helper('language'); in the function index i have loaded the file public function index() { $this->lang->load('user_lang', 'french'); } at the view user <div class="pageTitle"><?=$this->lang->line('login');?></div> at the log i have this error : ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" how can i change from one language to another with a link ? multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" - El Forum - 02-02-2013 [eluser]dinisptc[/eluser] $this->lang->load(‘user’, ‘french’); its not working anyway multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login" - El Forum - 02-02-2013 [eluser]dinisptc[/eluser] now its working the lang->line <div class="pageTitle"><?php echo $this->lang->line('user_login');?></div> but the problem its that its not loading the french language file <?php $this->lang->load('user', 'french'); ?> in my config i have $config['language'] = 'english'; its just loading the english language how can i load other languages, and how can i switch languages with a link |