Is there a way to have all content change with language selection?

Is there a way to have all content change with language selection?

by Todd Anderson -
Number of replies: 4
Any suggestions on how to get the content I add to my Moodle site to change language along with the generated content of the site?
Average of ratings: -
In reply to Todd Anderson

Re: Is there a way to have all content change with language selection?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Yes there is a way smile

The tool is called the multilang filter and can be enabled in admin -> filters
You use it by putting the different languages between special tags in one resource, label ...

The documentation should come here: http://docs.moodle.org/en/Filters#Multi-language_content verlegen

Any takers to write it? I'll take a quick look if I can find something already...
In reply to koen roggemans

Re: Is there a way to have all content change with language selection?

by David McDermott -
Can I change the language of the front page description area?

I'm using 1.6 beta, I have the following variables enabled:
lang menu=Yes
langcache=No
In Filters I have Multi-Language Content at the top of a list with an eye next to it and have the filter setting:
 Filter all strings=Yes

The html (I'm just using simple html) I have in the front page description box has 2 blocks of text thus:
<lang lang="en"> my html & text1 here </lang>
<lang lang="fr"> my html & text2 here </lang>

The problem I have is that BOTH text blocks (text1 and text2) display all the time, regardless of which language I choose from the dropdown language selector; it appears the lang tags are being ignored

Am I doing something wrong/missing something obvious? Is it possible to make the text in the front page description box change language with the language selection?

I'd be happy to help with the documentation if I can .. but I'd need some simple working examples ...
In reply to David McDermott

Re: Is there a way to have all content change with language selection?

by Eloy Lafuente (stronk7) -
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 Testers
Hi David,

I've copied and pasted your code in my test site and, running Moodle 1.6 beta, I'm able to switch contents properly from the lang menu.

More yet, "Filter all strings" is not needed for that exact text.

Could it be possible that such text was cached before enabling filters? Just wondering...

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Is there a way to have all content change with language selection?

by David McDermott -
Thanks Eloy
It was poor HTML code on my part, I repeated what you did, which worked. Then started to reduce the html I was using to find the offending string. Sorry for being a bit stupid here - but thanks again - now I am motoring with Moodle smile