* (bug 3175) update filenames in documentation files
[lhc/web/wiklou.git] / docs / language.txt
1 language.txt
2
3 The Language object handles all readable text produced by the
4 software. The most used function is getMessage(), usually
5 called with the wrapper function wfMsg() which calls that method
6 on the global language object. It just returns a piece of text
7 given a text key. It is recommended that you use each key only
8 once--bits of text in different contexts that happen to be
9 identical in English may not be in other languages, so it's
10 better to add new keys than to reuse them a lot. Likewise,
11 if there is text that gets combined with things like names and
12 titles, it is better to put markers like "$1" inside a piece
13 of text and use str_replace() than to compose such messages in
14 code, because their order may change in other languages too.
15
16 While the system is running, there will be one global language
17 object, which will be a subtype of Language. The methods in
18 these objects will return the native text requested if available,
19 otherwise they fall back to sending English text (which is why
20 the LanguageEn object has no code at all--it just inherits the
21 English defaults of the Language base class).
22
23 The names of the namespaces are also contained in the language
24 object, though the numbers are fixed.