CodeIgniter Forums
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">&lt;?=$this->lang->line('login');?&gt;</div>

at the log i have this error :
ERROR - 2013-02-02 13:20:09 --&gt; 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 --&gt; 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 --&gt; Could not find the language line "login" - El Forum - 02-02-2013

[eluser]dinisptc[/eluser]

now its working the lang->line

<div class="pageTitle">&lt;?php echo $this->lang->line('user_login');?&gt;</div>

but the problem its that its not loading the french language file

&lt;?php $this->lang->load('user', 'french'); ?&gt;


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