Welcome Guest, Not a member yet? Register   Sign In
language file not loading?
#1

[eluser]rossmurphy[/eluser]
Hi all,

I have a french and english language folder..looks like this..

Code:
- languages
    - en
       -lobby_lang.php
    -fr
       -lobby_lang.php

I have 'fr' set in the autoload.php file to autoload as the default language.

I am using this code:

Code:
$this->lang->load('lobby', 'en');

to load the english. BUT i am still getting key's fromt he 'fr' file. Am i doing this wrong?

Thanks in advance.
#2

[eluser]rossmurphy[/eluser]
I figured out that i have to do

Code:
$this->load->lang('', '')

Then echo the key in order to print out the key from the language file i want. If i don't load the language file in the same controller it will produce the key from the default language which is set in the config file and the autoload file.

What i'm wondering is..Is there a way to change this default language dynamically, so that i don't have to say $this->load->lang in every controller?

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB