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