MDL-7602 - Multianswer question type only works with invalid HTML. Merged from MOODLE...
[moodle.git] / filter / multilang / README.txt
CommitLineData
71c235bc 1$Id$
2
3To Install it:
4 - Enable if from "Administration/Filters".
5
6To Use it:
5510ae0f 7 - Create your contents in multiple languages.
71c235bc 8 - Enclose every language content between:
5510ae0f 9 <span lang="XX">your_content_here</span>
71c235bc 10 - Test it (by changing your language).
11
1f6d63e8 12How it works:
13 - look for "lang blocks" in the code.
14 - for each "lang block":
15 - if there are texts in the currently active language, print them.
16 - else, if there exists texts in the current parent language, print them.
1f6d63e8 17 - else, print the first language found in the text.
18 - text out of "lang blocks" will be showed always.
19
20Definition of "lang block":
21 Is a collection of lang tags separated only by whitespace chars (space,
5510ae0f 22 tab, linefeed or return chars).
1f6d63e8 23
24One example in action:
25 - This text:
26 <span lang="en">Hello!</span><span lang="es">Hola!</span>
27 This text is common for every language because it's out from any lang block.
28 <span lang="en">Bye!</span><span lang="it">Ciao!</span>
29
30 - Will print, if current language is English:
31 Hello!
32 This text is common for every language because it's out from any lang block.
33 Bye!
34
5510ae0f 35 - And, in Spanish, it will print:
1f6d63e8 36 Hola!
37 This text is common for every language because it's out from any lang block.
38 Bye!
39
40
71c235bc 41Ciao, Eloy :-)
42stronk7@moodle.org
1f6d63e8 432005-11-16