MDL-30070 message: Optimised search for users over multiple courses
[moodle.git] / filter / multilang / README.txt
CommitLineData
71c235bc 1To Install it:
2 - Enable if from "Administration/Filters".
4317f92f 3
71c235bc 4To Use it:
5510ae0f 5 - Create your contents in multiple languages.
71c235bc 6 - Enclose every language content between:
f16242ce 7 <span lang="XX" class="multilang">your_content_here</span><span lang="YY" class="multilang">your_content_other_lang</span>
71c235bc 8 - Test it (by changing your language).
9
1f6d63e8 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.
1f6d63e8 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,
5510ae0f 20 tab, linefeed or return chars).
1f6d63e8 21
22One example in action:
23 - This text:
f16242ce 24 <span lang="en" class="multilang">Hello!</span><span lang="es" class="multilang">Hola!</span>
1f6d63e8 25 This text is common for every language because it's out from any lang block.
f16242ce 26 <span lang="en" class="multilang">Bye!</span><span lang="it" class="multilang">Ciao!</span>
1f6d63e8 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
5510ae0f 33 - And, in Spanish, it will print:
1f6d63e8 34 Hola!
35 This text is common for every language because it's out from any lang block.
36 Bye!
4317f92f 37
1f6d63e8 38
71c235bc 39Ciao, Eloy :-)
40stronk7@moodle.org
1f6d63e8 412005-11-16
f16242ce 42
43Syntax was changed in 1.8, the conversion of existing text is done from admin/multilangupgrade.php
44Ciao, skodak :-)
452006-12-11