Welcome Guest, Not a member yet? Register   Sign In
autoload language not switching - why?
#1

[eluser]aggrav8d[/eluser]
I've been moving all the strings into language files. I auto-load the common strings file. when I switch between languages the common strings file is always the English version, while the rest of the loaded-at-constructor language files swap as expected. What am I doing wrong? The site uses CI 1.7.2.
#2

[eluser]tomcode[/eluser]
You need to switch the language before You load the language files.

Additionally : You cannot reload a once loaded language file.

In practice : do not autoload language files on a multi language site.
#3

[eluser]aggrav8d[/eluser]
Yeah, I was calling my swap language handler as a post-constructor hook and loading the language files the MY_Controller constructor. Once I got rid of the hook and made sure the handler happened before the language file load, everything was good.

Thanks for the tip!




Theme © iAndrew 2016 - Forum software by © MyBB