Welcome Guest, Not a member yet? Register   Sign In

Hi. I wanna make a multilanguage website, but I do not want that the language appear in URI like example.com/fr/about (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.

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);

Theme © iAndrew 2016 - Forum software by © MyBB