MDL-11561 admin tree improvements and bugfixing
[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:
f16242ce 9 <span lang="XX" class="multilang">your_content_here</span><span lang="YY" class="multilang">your_content_other_lang</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:
f16242ce 26 <span lang="en" class="multilang">Hello!</span><span lang="es" class="multilang">Hola!</span>
1f6d63e8 27 This text is common for every language because it's out from any lang block.
f16242ce 28 <span lang="en" class="multilang">Bye!</span><span lang="it" class="multilang">Ciao!</span>
1f6d63e8 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
f16242ce 44
45Syntax was changed in 1.8, the conversion of existing text is done from admin/multilangupgrade.php
46Ciao, skodak :-)
472006-12-11