Welcome Guest, Not a member yet? Register   Sign In
multilanguage codeigniter ERROR - 2013-02-02 13:20:09 --> Could not find the language line "login"
#1

[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 ?
#2

[eluser]dinisptc[/eluser]
$this->lang->load(‘user’, ‘french’);

its not working anyway
#3

[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




Theme © iAndrew 2016 - Forum software by © MyBB