Welcome Guest, Not a member yet? Register   Sign In
change default language at runtime ?
#1

Hi,

is it possible to change the default language at runtime and automatically reload all language files that are declared in the autoload property ?

thanks.
Reply
#2

I don't think you can automatically reload the language files, so you have to set the language before the language files are loaded.

Otherwise, you could loop through $this->lang->is_loaded to determine which files have been loaded (and reload them with the new language idiom).
Reply
Reply
#4

(03-23-2015, 07:29 AM)mwhitney Wrote: I don't think you can automatically reload the language files, so you have to set the language before the language files are loaded.

Otherwise, you could loop through $this->lang->is_loaded to determine which files have been loaded (and reload them with the new language idiom).

Hi,
thanks for the answer. Indeed using $this->lang->is_loaded works fine for me.

thank you !
Reply
#5

(03-23-2015, 07:29 AM)mwhitney Wrote: I don't think you can automatically reload the language files, so you have to set the language before the language files are loaded.

Otherwise, you could loop through $this->lang->is_loaded to determine which files have been loaded (and reload them with the new language idiom).

Why is this property not documented ?
Reply
#6

Because you're not supposed to use it. Don't.
Reply
#7

It looks like I'll have to pay a little more attention to the documentation. I wouldn't have mentioned it if it was set as a protected property or marked as deprecated in the code.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB