Page 1 of 1

Language's "selected" does not work (v2021)

Posted: Wed Sep 09, 2020 11:14 am
by mobhar
It seems the selected language property of language does not work. I've just tried with 3 languages (en, id, and ar), and here is the result from View Page Source of browser:

ew.vars = {"languages":{"languages":[{"id":"ar","desc":"ar","selected":false},{"id":"en","desc":"en","selected":false},{"id":"id","desc":"id","selected":false}]}

However, when I call CurrentLanguageID() global function, it works as expected. Only the "selected" property of the languages Javascript variable above does not work.

Re: Language's "selected" does not work (v2021)

Posted: Wed Sep 09, 2020 12:20 pm
by mobhar
I think I've just found out the solution for this issue. Simply remove that code from toJson() function to inside the __construct() of Language class. Just put it right below this line:
// Call Language Load event
$this->languageLoad();

and now the issue has gone. It works as expected now.

Hope this helps.

Re: Language's "selected" does not work (v2021)

Posted: Wed Sep 09, 2020 12:30 pm
by Webmaster
Click Tools -> Update Template and try again.

Re: Language's "selected" does not work (v2021)

Posted: Wed Sep 09, 2020 1:08 pm
by mobhar
Thanks. Now it works properly.