MDL-30070 message: Optimised search for users over multiple courses
[moodle.git] / filter / multilang / README.txt
... / ...
CommitLineData
1To Install it:
2 - Enable if from "Administration/Filters".
3
4To Use it:
5 - Create your contents in multiple languages.
6 - Enclose every language content between:
7 <span lang="XX" class="multilang">your_content_here</span><span lang="YY" class="multilang">your_content_other_lang</span>
8 - Test it (by changing your language).
9
10How it works:
11 - look for "lang blocks" in the code.
12 - for each "lang block":
13 - if there are texts in the currently active language, print them.
14 - else, if there exists texts in the current parent language, print them.
15 - else, print the first language found in the text.
16 - text out of "lang blocks" will be showed always.
17
18Definition of "lang block":
19 Is a collection of lang tags separated only by whitespace chars (space,
20 tab, linefeed or return chars).
21
22One example in action:
23 - This text:
24 <span lang="en" class="multilang">Hello!</span><span lang="es" class="multilang">Hola!</span>
25 This text is common for every language because it's out from any lang block.
26 <span lang="en" class="multilang">Bye!</span><span lang="it" class="multilang">Ciao!</span>
27
28 - Will print, if current language is English:
29 Hello!
30 This text is common for every language because it's out from any lang block.
31 Bye!
32
33 - And, in Spanish, it will print:
34 Hola!
35 This text is common for every language because it's out from any lang block.
36 Bye!
37
38
39Ciao, Eloy :-)
40stronk7@moodle.org
412005-11-16
42
43Syntax was changed in 1.8, the conversion of existing text is done from admin/multilangupgrade.php
44Ciao, skodak :-)
452006-12-11