From 0c9cd5ea50982344b407ad5c4519c964c03f6a1d Mon Sep 17 00:00:00 2001 From: wl Date: Tue, 7 Feb 2006 06:10:39 +0000 Subject: * tmac/LOCALIZATION: New file. * man/groff_tmac.man: Mention fr.tmac. --- ChangeLog | 4 +++- man/groff_tmac.man | 26 +++++++++++++++++++++++--- tmac/LOCALIZATION | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 tmac/LOCALIZATION diff --git a/ChangeLog b/ChangeLog index e62a5211..efe0be32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,8 +6,10 @@ package. This feature has been contributed by Fabrice Ménard . - * tmac/fr.tmac, tmac/trans.tmac, tmac/hyphen.fr: New files. + * tmac/fr.tmac, tmac/trans.tmac, tmac/hyphen.fr, tmac/LOCALIZATION: + New files. * tmac/README: Mention hyphen.fr. + * man/groff_tmac.man: Mention fr.tmac. * NEWS: Updated. 2006-01-27 Werner LEMBERG diff --git a/man/groff_tmac.man b/man/groff_tmac.man index 030e739f..4fb44b01 100644 --- a/man/groff_tmac.man +++ b/man/groff_tmac.man @@ -14,11 +14,12 @@ groff_tmac.5 File position: /man/groff_tmac.man -Last update: 27 Jul 2004 +Last update: 07 Feb 2006 This file is part of groff, the GNU roff type-setting system. -Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 + Free Software Foundation, Inc. written by Bernd Warken and Werner Lemberg @@ -412,6 +413,24 @@ macro package or to plain groff. . . .TP +.B fr +This file adds support for French localization of the main macro packages +(me, mom, mm, and ms). +. +It should be used as the last macro package on the command line. +. +Example: +.IP +.Shell_cmd "groff -ms -mfr foo.ms > foo.ps" +. +.IP +Note that +.BR fr.tmac +sets the input encoding to latin-9 to get proper support of the `oe' +ligature. +. +. +.TP .B papersize This macro file is already loaded at start-up by .B @g@troff @@ -1211,7 +1230,8 @@ See the previous section for a detailed description. .SH AUTHOR .\" -------------------------------------------------------------------- . -Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 +Free Software Foundation, Inc. . .P This document is distributed under the terms of the FDL (GNU Free diff --git a/tmac/LOCALIZATION b/tmac/LOCALIZATION new file mode 100644 index 00000000..71f8c7cd --- /dev/null +++ b/tmac/LOCALIZATION @@ -0,0 +1,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). -- cgit v1.2.1