Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
To Install it:
2
    - Enable if from "Administration/Filters".
3
 
4
To 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
 
10
How 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
 
18
Definition of "lang block":
19
    Is a collection of lang tags separated only by whitespace chars (space,
20
    tab, linefeed or return chars).
21
 
22
One 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
 
39
Ciao, Eloy :-)
40
stronk7@moodle.org
41
2005-11-16
42
 
43
Syntax was changed in 1.8, the conversion of existing text is done from admin/multilangupgrade.php
44
Ciao, skodak :-)
45
2006-12-11