summaryrefslogtreecommitdiff
path: root/tmac/LOCALIZATION
blob: 71f8c7cd1226e8a6a9c97ffb86679ed569869476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

Localization
------------

The localization process involves two files.

  - A locale dependent file (for example, fr.tmac for French) where all
    locale specific strings are (re)defined.

  - A locale independent file (trans.tmac) responsible for activating those
    localized strings.

All you have to do is to create a new file named `LL.tmac' where `LL' is
your country code (`de' for Germany, `el' for Greece, ...), maybe using
`fr.tmac' as a template.

The first thing to do is to redefine the string `locale' to your language.

  .ds locale german\"

Then change all the translations in the predefined strings.  Don't forget
the \" at the end of each string, preventing spaces from lurking around.

After `trans.tmac' has been called by

  .mso trans.tmac

you must redefine the date strings in order to use the day and month names
translated earlier.  If you don't feel comfortable with groff maybe you
should use the definitions used in `fr.tmac'.  Nevertheless, you should take
care of the order of the date elements.

  - If your date format is MM/DD/YY:

      for ms: .ds DY \*[MO] \n[dy] \n[year]
      for mm: .ds cov*new-date \\*[MO\\n[mo]] \\n[dy] \\n[year]
      for me: .ds td \*(mo \n(dy \n(y4

  - If your date format is DD/MM/YY:

      for ms: .ds DY \n[dy] \*[MO] \n[year]
      for mm: .ds cov*new-date \\n[dy] \\*[MO\\n[mo]] \\n[year]
      for me: .ds td \n(dy \*(mo \n(y4

Other date formats can be handled similarly.

NOTE: For the mm package, in the `ISODATE' macro, only the first definition
      of `cov*new-date' must be changed (see `fr.tmac').

Finally, change groff behaviour in order to comply with your locale.  For
example, `fr.tmac' changes the default encoding, sets the sentence spaces,
and final activates hyphenation, provided there are hyphenation patterns
available (which should be put into files named `hyphen.LL' for
consistency).