CodeIgniter Forums
Languages - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Languages (/showthread.php?tid=27349)

Languages - El Forum - 02-08-2010

Hi. I wanna make a multilanguage website, but I do not want that the language appear in URI like (I do not want this). I just want to change the text language. My problem is that the first load language that I do is for ever. why?
If I do:


just the english appear. How can I fix this?

My config language autoload is empty.

Thank you for your help.

Languages - El Forum - 02-08-2010

Welcome xptohacking,

You need to set the language before You load language files.

You cannot load several versions of the same language file (say english/my_lang.php and french/my_lang.php).

The second parameter of $this->lang->load() allows You only to load a file in another language than specified in the configuration.

If You want to use several versions of the same language file, You need to set the third param of $this->lang->load(), but this won't 'load' the strings for use with $this->lang->line(), it will return the strings :

$english_strings = $this->lang->load('my_lang', 'english', true);

$french_strings = $this->lang->load('my_lang', 'french', true);