Merge branch 'vendor/TNFTP'
[dragonfly.git] / contrib / groff / tmac / LOCALIZATION
1
2 Localization
3 ------------
4
5 The localization process involves two files.
6
7   - A locale dependent file (for example, fr.tmac for French) where all
8     locale specific strings are (re)defined.
9
10   - A locale independent file (trans.tmac) responsible for activating those
11     localized strings.
12
13 All you have to do is to create a new file named `LL.tmac' where `LL' is
14 your country code (`de' for Germany, `el' for Greece, ...), maybe using
15 `fr.tmac' as a template.
16
17 The first thing to do is to redefine the string `locale' to your language.
18
19   .ds locale german\"
20
21 Then change all the translations in the predefined strings.  Don't forget
22 the \" at the end of each string, preventing spaces from lurking around.
23
24 After `trans.tmac' has been called by
25
26   .mso trans.tmac
27
28 you must redefine the date strings in order to use the day and month names
29 translated earlier.  If you don't feel comfortable with groff maybe you
30 should use the definitions used in `fr.tmac'.  Nevertheless, you should take
31 care of the order of the date elements.
32
33   - If your date format is MM/DD/YY:
34
35       for ms: .ds DY \*[MO] \n[dy] \n[year]
36       for mm: .ds cov*new-date \\*[MO\\n[mo]] \\n[dy] \\n[year]
37       for me: .ds td \*(mo \n(dy \n(y4
38
39   - If your date format is DD/MM/YY:
40
41       for ms: .ds DY \n[dy] \*[MO] \n[year]
42       for mm: .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] \\n[year]
43       for me: .ds td \n(dy \*(mo \n(y4
44
45 Other date formats can be handled similarly.
46
47 NOTE: For the mm package, in the `ISODATE' macro, only the first definition
48       of `cov*new-date' must be changed (see `fr.tmac').
49
50 Finally, change groff behaviour in order to comply with your locale.  For
51 example, `fr.tmac' changes the default encoding, sets the sentence spaces,
52 and final activates hyphenation, provided there are hyphenation patterns
53 available (which should be put into files named `hyphen.LL' for
54 consistency).