Home | History | Annotate | Line # | Download | only in doc
      1  1.1  christos @node Translation Intro
      2  1.1  christos @chapter Notes on the Free Translation Project
      3  1.1  christos 
      4  1.1  christos @set STATUS October 2006
      5  1.1  christos 
      6  1.1  christos Free software is going international!  The Free Translation Project is
      7  1.1  christos a way to get maintainers of free software, translators, and users all
      8  1.1  christos together, so that free software will gradually become able to speak many
      9  1.1  christos languages.  A few packages already provide translations for their messages.
     10  1.1  christos 
     11  1.1  christos If you found this @file{ABOUT-NLS} file inside a distribution, you
     12  1.1  christos may assume that the distributed package does use GNU @code{gettext}
     13  1.1  christos internally, itself available at your nearest GNU archive site.  But you
     14  1.1  christos do @emph{not} need to install GNU @code{gettext} prior to configuring,
     15  1.1  christos installing or using this package with messages translated.
     16  1.1  christos 
     17  1.1  christos Installers will find here some useful hints.  These notes also explain
     18  1.1  christos how users should proceed for getting the programs to use the available
     19  1.1  christos translations.  They tell how people wanting to contribute and work
     20  1.1  christos on translations can contact the appropriate team.
     21  1.1  christos 
     22  1.1  christos When reporting bugs in the @file{intl/} directory or bugs which may
     23  1.1  christos be related to internationalization, you should tell about the version
     24  1.1  christos of @code{gettext} which is used.  The information can be found in
     25  1.1  christos the @file{intl/VERSION} file, in internationalized packages.
     26  1.1  christos 
     27  1.1  christos @menu
     28  1.1  christos * Configuration advice::
     29  1.1  christos * INSTALL Matters::
     30  1.1  christos * Using This Package::
     31  1.1  christos * Translating Teams::
     32  1.1  christos * Available Packages::
     33  1.1  christos * Using gettext in own code::
     34  1.1  christos @end menu
     35  1.1  christos 
     36  1.1  christos @node Configuration advice
     37  1.1  christos @section Quick configuration advice
     38  1.1  christos 
     39  1.1  christos If you want to exploit the full power of internationalization, you
     40  1.1  christos should configure it using
     41  1.1  christos 
     42  1.1  christos @example
     43  1.1  christos ./configure --with-included-gettext
     44  1.1  christos @end example
     45  1.1  christos 
     46  1.1  christos @noindent
     47  1.1  christos to force usage of internationalizing routines provided within this
     48  1.1  christos package, despite the existence of internationalizing capabilities in the
     49  1.1  christos operating system where this package is being installed.  So far, only
     50  1.1  christos the @code{gettext} implementation in the GNU C library version 2
     51  1.1  christos provides as many features (such as locale alias, message inheritance,
     52  1.1  christos automatic charset conversion or plural form handling)
     53  1.1  christos as the implementation here.  It is also not possible to offer this
     54  1.1  christos additional functionality on top of a @code{catgets} implementation.
     55  1.1  christos Future versions of GNU @code{gettext} will very likely convey even more
     56  1.1  christos functionality.  So it might be a good idea to change to GNU
     57  1.1  christos @code{gettext} as soon as possible.
     58  1.1  christos 
     59  1.1  christos So you need @emph{not} provide this option if you are using GNU libc 2 or
     60  1.1  christos you have installed a recent copy of the GNU gettext package with the
     61  1.1  christos included @file{libintl}.
     62  1.1  christos 
     63  1.1  christos 
     64  1.1  christos @node INSTALL Matters
     65  1.1  christos @section INSTALL Matters
     66  1.1  christos 
     67  1.1  christos Some packages are @dfn{localizable} when properly installed; the
     68  1.1  christos programs they contain can be made to speak your own native language.
     69  1.1  christos Most such packages use GNU @code{gettext}.  Other packages have their
     70  1.1  christos own ways to internationalization, predating GNU @code{gettext}.
     71  1.1  christos 
     72  1.1  christos By default, this package will be installed to allow translation of
     73  1.1  christos messages.  It will automatically detect whether the system already
     74  1.1  christos provides the GNU @code{gettext} functions.  If not, the included GNU
     75  1.1  christos @code{gettext} library will be used.  This library is wholly
     76  1.1  christos contained within this package, usually in the @file{intl/} subdirectory,
     77  1.1  christos so prior installation of the GNU @code{gettext} package is @emph{not}
     78  1.1  christos required.  Installers may use special options at configuration time for
     79  1.1  christos changing the default behaviour.  The commands:
     80  1.1  christos 
     81  1.1  christos @example
     82  1.1  christos ./configure --with-included-gettext
     83  1.1  christos ./configure --disable-nls
     84  1.1  christos @end example
     85  1.1  christos 
     86  1.1  christos @noindent
     87  1.1  christos will, respectively, bypass any pre-existing @code{gettext} to use the
     88  1.1  christos internationalizing routines provided within this package, or else,
     89  1.1  christos @emph{totally} disable translation of messages.
     90  1.1  christos 
     91  1.1  christos When you already have GNU @code{gettext} installed on your system and
     92  1.1  christos run configure without an option for your new package, @code{configure}
     93  1.1  christos will probably detect the previously built and installed @file{libintl.a}
     94  1.1  christos file and will decide to use this.  This might not be desirable.
     95  1.1  christos You should use the more recent version of the GNU @code{gettext}
     96  1.1  christos library.  I.e.@: if the file @file{intl/VERSION} shows that the library
     97  1.1  christos which comes with this package is more recent, you should use
     98  1.1  christos 
     99  1.1  christos @example
    100  1.1  christos ./configure --with-included-gettext
    101  1.1  christos @end example
    102  1.1  christos 
    103  1.1  christos @noindent
    104  1.1  christos to prevent auto-detection.
    105  1.1  christos 
    106  1.1  christos The configuration process will not test for the @code{catgets} function
    107  1.1  christos and therefore it will not be used.  The reason is that even an
    108  1.1  christos emulation of @code{gettext} on top of @code{catgets} could not provide
    109  1.1  christos all the extensions of the GNU @code{gettext} library.
    110  1.1  christos 
    111  1.1  christos Internationalized packages usually have many @file{po/@var{ll}.po}
    112  1.1  christos files, where @var{ll} gives an @w{ISO 639} two-letter code
    113  1.1  christos identifying the language.  Unless translations have been forbidden
    114  1.1  christos at @code{configure} time by using the @samp{--disable-nls} switch,
    115  1.1  christos all available translations are installed together with the package.
    116  1.1  christos However, the environment variable @code{LINGUAS} may be set, prior
    117  1.1  christos to configuration, to limit the installed set.  @code{LINGUAS} should
    118  1.1  christos then contain a space separated list of two-letter codes, stating
    119  1.1  christos which languages are allowed.
    120  1.1  christos 
    121  1.1  christos @node Using This Package
    122  1.1  christos @section Using This Package
    123  1.1  christos 
    124  1.1  christos @c --
    125  1.1  christos @c FIXME: rewrite to document the aliases.
    126  1.1  christos @c --
    127  1.1  christos As a user, if your language has been installed for this package, you
    128  1.1  christos only have to set the @code{LANG} environment variable to the appropriate
    129  1.1  christos @samp{@var{ll}_@var{CC}} combination.  Here @samp{@var{ll}} is an
    130  1.1  christos @w{ISO 639} two-letter language code, and @samp{@var{CC}} is an
    131  1.1  christos @w{ISO 3166} two-letter country code.  For example, let's suppose that you
    132  1.1  christos speak German and live in Germany.  At the shell prompt, merely execute
    133  1.1  christos @w{@samp{setenv LANG de_DE}} (in @code{csh}),
    134  1.1  christos @w{@samp{export LANG; LANG=de_DE}} (in @code{sh}) or
    135  1.1  christos @w{@samp{export LANG=de_DE}} (in @code{bash}).  This can be done from your
    136  1.1  christos @file{.login} or @file{.profile} file, once and for all.
    137  1.1  christos 
    138  1.1  christos You might think that the country code specification is redundant.  But in
    139  1.1  christos fact, some languages have dialects in different countries.  For example,
    140  1.1  christos @samp{de_AT} is used for Austria, and @samp{pt_BR} for Brazil.  The country
    141  1.1  christos code serves to distinguish the dialects.
    142  1.1  christos 
    143  1.1  christos The locale naming convention of @samp{@var{ll}_@var{CC}}, with
    144  1.1  christos @samp{@var{ll}} denoting the language and @samp{@var{CC}} denoting the
    145  1.1  christos country, is the one use on systems based on GNU libc.  On other systems,
    146  1.1  christos some variations of this scheme are used, such as @samp{@var{ll}} or
    147  1.1  christos @samp{@var{ll}_@var{CC}.@var{encoding}}.  You can get the list of
    148  1.1  christos locales supported by your system for your language by running the command
    149  1.1  christos @samp{locale -a | grep '^@var{ll}'}.
    150  1.1  christos 
    151  1.1  christos Not all programs have translations for all languages.  By default, an
    152  1.1  christos English message is shown in place of a nonexistent translation.  If you
    153  1.1  christos understand other languages, you can set up a priority list of languages.
    154  1.1  christos This is done through a different environment variable, called
    155  1.1  christos @code{LANGUAGE}.  GNU @code{gettext} gives preference to @code{LANGUAGE}
    156  1.1  christos over @code{LANG} for the purpose of message handling, but you still
    157  1.1  christos need to have @code{LANG} set to the primary language; this is required
    158  1.1  christos by other parts of the system libraries.
    159  1.1  christos For example, some Swedish users who would rather read translations in
    160  1.1  christos German than English for when Swedish is not available, set @code{LANGUAGE}
    161  1.1  christos to @samp{sv:de} while leaving @code{LANG} to @samp{sv_SE}.
    162  1.1  christos 
    163  1.1  christos Special advice for Norwegian users: The language code for Norwegian
    164  1.1  christos bokm@ringaccent{a}l changed from @samp{no} to @samp{nb} recently (in 2003).
    165  1.1  christos During the transition period, while some message catalogs for this language
    166  1.1  christos are installed under @samp{nb} and some older ones under @samp{no}, it's
    167  1.1  christos recommended for Norwegian users to set @code{LANGUAGE} to @samp{nb:no} so that
    168  1.1  christos both newer and older translations are used.
    169  1.1  christos 
    170  1.1  christos In the @code{LANGUAGE} environment variable, but not in the @code{LANG}
    171  1.1  christos environment variable, @samp{@var{ll}_@var{CC}} combinations can be
    172  1.1  christos abbreviated as @samp{@var{ll}} to denote the language's main dialect.
    173  1.1  christos For example, @samp{de} is equivalent to @samp{de_DE} (German as spoken in
    174  1.1  christos Germany), and @samp{pt} to @samp{pt_PT} (Portuguese as spoken in Portugal)
    175  1.1  christos in this context.
    176  1.1  christos 
    177  1.1  christos @c An operating system might already offer message localization for many of
    178  1.1  christos @c its programs, while other programs have been
    179  1.1  christos @c installed locally with the full capabilities of GNU @code{gettext}.
    180  1.1  christos @c Just using @code{gettext} extended syntax for @code{LANG} would break
    181  1.1  christos @c proper localization of already available operating system programs.
    182  1.1  christos @c FIXME: The user doesn't care about design justifications. --bruno
    183  1.1  christos 
    184  1.1  christos @node Translating Teams
    185  1.1  christos @section Translating Teams
    186  1.1  christos 
    187  1.1  christos For the Free Translation Project to be a success, we need interested
    188  1.1  christos people who like their own language and write it well, and who are also
    189  1.1  christos able to synergize with other translators speaking the same language.
    190  1.1  christos Each translation team has its own mailing list.  The up-to-date list
    191  1.1  christos of teams can be found at the Free Translation Project's homepage,
    192  1.1  christos @file{http://www.iro.umontreal.ca/contrib/po/HTML/}, in the
    193  1.1  christos "National teams" area.
    194  1.1  christos 
    195  1.1  christos If you'd like to volunteer to @emph{work} at translating messages, you
    196  1.1  christos should become a member of the translating team for your own language.
    197  1.1  christos The subscribing address is @emph{not} the same as the list itself, it
    198  1.1  christos has @samp{-request} appended.  For example, speakers of Swedish can send
    199  1.1  christos a message to @w{@file{sv-request@@li.org}}, having this message body:
    200  1.1  christos 
    201  1.1  christos @example
    202  1.1  christos subscribe
    203  1.1  christos @end example
    204  1.1  christos 
    205  1.1  christos Keep in mind that team members are expected to participate
    206  1.1  christos @emph{actively} in translations, or at solving translational
    207  1.1  christos difficulties, rather than merely lurking around.  If your team does not
    208  1.1  christos exist yet and you want to start one, or if you are unsure about what to
    209  1.1  christos do or how to get started, please write to
    210  1.1  christos @w{@file{translation@@iro.umontreal.ca}} to reach the
    211  1.1  christos coordinator for all translator teams.
    212  1.1  christos 
    213  1.1  christos The English team is special.  It works at improving and uniformizing
    214  1.1  christos the terminology in use.  Proven linguistic skills are praised
    215  1.1  christos more than programming skills, here.
    216  1.1  christos 
    217  1.1  christos @node Available Packages
    218  1.1  christos @section Available Packages
    219  1.1  christos 
    220  1.1  christos Languages are not equally supported in all packages.  The following
    221  1.1  christos matrix shows the current state of internationalization, as of
    222  1.1  christos @value{STATUS}.  The matrix shows, in regard of each package, for which
    223  1.1  christos languages PO files have been submitted to translation coordination,
    224  1.1  christos with a translation percentage of at least 50%.
    225  1.1  christos 
    226  1.1  christos @include matrix.texi
    227  1.1  christos 
    228  1.1  christos Some counters in the preceding matrix are higher than the number of visible
    229  1.1  christos blocks let us expect.  This is because a few extra PO files are used for
    230  1.1  christos implementing regional variants of languages, or language dialects.
    231  1.1  christos 
    232  1.1  christos For a PO file in the matrix above to be effective, the package to which
    233  1.1  christos it applies should also have been internationalized and distributed as
    234  1.1  christos such by its maintainer.  There might be an observable lag between the
    235  1.1  christos mere existence a PO file and its wide availability in a distribution.
    236  1.1  christos 
    237  1.1  christos If @value{STATUS} seems to be old, you may fetch a more recent copy
    238  1.1  christos of this @file{ABOUT-NLS} file on most GNU archive sites.  The most
    239  1.1  christos up-to-date matrix with full percentage details can be found at
    240  1.1  christos @file{http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html}.
    241  1.1  christos 
    242  1.1  christos 
    243  1.1  christos @node Using gettext in own code
    244  1.1  christos @section Using @code{gettext} in new packages
    245  1.1  christos 
    246  1.1  christos If you are writing a freely available program and want to internationalize
    247  1.1  christos it you are welcome to use GNU @file{gettext} in your package.  Of course
    248  1.1  christos you have to respect the GNU Library General Public License which covers
    249  1.1  christos the use of the GNU @file{gettext} library.  This means in particular that
    250  1.1  christos even non-free programs can use @code{libintl} as a shared library, whereas
    251  1.1  christos only free software can use @code{libintl} as a static library or use
    252  1.1  christos modified versions of @code{libintl}.
    253  1.1  christos 
    254  1.1  christos Once the sources are changed appropriately and the setup can handle the
    255  1.1  christos use of @code{gettext} the only thing missing are the translations.  The
    256  1.1  christos Free Translation Project is also available for packages which are not
    257  1.1  christos developed inside the GNU project.  Therefore the information given above
    258  1.1  christos applies also for every other Free Software Project.  Contact
    259  1.1  christos @w{@file{translation@@iro.umontreal.ca}} to make the @file{.pot} files
    260  1.1  christos available to the translation teams.
    261