Language changes only after logging out / in again (multilang filters)

Language changes only after logging out / in again (multilang filters)

by Kaba Leuner -
Number of replies: 4

Hey,

after an upgrade to latest version I've got the issue, that user language change in user menu doesn't affect all language strings anymore. In fact, after changing the language, it affects immediately every strings except the ones in my main navigation which are multilang spans. But after logging out and in again, it's correct. This is theme independent.


Anyone an idea? Thanks in advance


PS: Adding &lang=xx parameter to url doesn't either for multilang spans

Average of ratings: -
In reply to Kaba Leuner

Re: Language changes only after logging out / in again (multilang filters)

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

except the ones in my main navigation which are multilang spans

I am not sure I understand this correctly. Can you maybe provide a screenshot or so?

In reply to David Mudrák

Re: Language changes only after logging out / in again (multilang filters)

by Kaba Leuner -

Thanks for your answer and sorry if I wasn't clear enough.

In my main menu I use multilang spans (<span class="multilang" lang="xx">bla</span>) for the menu items.

When I change the language via language menu, the page reloads and everything is translated on the page - except my main menu items. But after logging out and in, they're also working correctly in the just chosen language.

First I was going to write something like "my main menu language is not changing" but I realised, that it only affects menu items which where added with multilang string.

In reply to Kaba Leuner

Re: Language changes only after logging out / in again (multilang filters)

by Kaba Leuner -

An addition: I noticed that sometimes also some special characters (like äöü...) on the site are "broken" and being displayed in a wrong encoding. Maybe there's a connection to the other problem?

In reply to Kaba Leuner

Re: Language changes only after logging out / in again (multilang filters)

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

I see. Thanks Kaba. I just tried on my Moodle 3.5 test installation and I can't reproduce your problem. In my case, whenever I change the language, the Main menu items switch to use the expected variant instantly, without the need to re-login.

  • What Moodle version are you using?
  • Are you using the default Multilang filter or some contributed add-on?
  • What languages do you have installed? What syntax do you use for those items?
  • On page Site administration > Plugins > Caching > Configuration, what cache store do you have configures for the cache "List of available languages" ?
Average of ratings: Useful (1)