php - Joomla 3 Change website language from framework -


we have our site in dutch opening version in france. decided have french language when people go .fr version of our site , dutch version if people go .nl version.

so created onafterinitialise plugin gets domain , want set language french. created overrides important language strings.

but how change language fr_fr? tried documentation noticed setlanguage deprecated in joomla 3?

greetings,

you need use jlanguage::getinstance instead of setlanguage deprecated. change language of site can use

$lang_code = "fr_fr"; $newlang = jlanguage::getinstance($lang_code); $app = jfactory::getapplication(); $app->loadlanguage($newlang); 

this load french language in .fr site.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -