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

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

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?
評比平均分數: -
In reply to Todd Anderson

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

koen roggemans發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Plugin developers的相片 Translators的相片
Yes there is a way 微笑

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?

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?

Eloy Lafuente (stronk7)發表於
Core developers的相片 Documentation writers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 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 微笑
In reply to Eloy Lafuente (stronk7)

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

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 微笑