blob: c19d9b9b4ab4e68bc4ec32eb23427cdd7af2f7b6 [file] [log] [blame]
Barry Warsaw0691a6b2000-08-30 03:27:10 +00001\section{\module{gettext} ---
2 Multilingual internationalization services}
3
4\declaremodule{standard}{gettext}
5\modulesynopsis{Multilingual internationalization services.}
Barry Warsawa770e862001-01-15 17:08:45 +00006\moduleauthor{Barry A. Warsaw}{barry@digicool.com}
7\sectionauthor{Barry A. Warsaw}{barry@digicool.com}
Barry Warsaw0691a6b2000-08-30 03:27:10 +00008
9
10The \module{gettext} module provides internationalization (I18N) and
11localization (L10N) services for your Python modules and applications.
Fred Draked576e9d2000-08-30 04:19:20 +000012It supports both the GNU \code{gettext} message catalog API and a
Barry Warsaw0691a6b2000-08-30 03:27:10 +000013higher level, class-based API that may be more appropriate for Python
14files. The interface described below allows you to write your
15module and application messages in one natural language, and provide a
16catalog of translated messages for running under different natural
17languages.
18
19Some hints on localizing your Python modules and applications are also
20given.
21
22\subsection{GNU \program{gettext} API}
23
24The \module{gettext} module defines the following API, which is very
25similar to the GNU \program{gettext} API. If you use this API you
26will affect the translation of your entire application globally. Often
27this is what you want if your application is monolingual, with the choice
28of language dependent on the locale of your user. If you are
29localizing a Python module, or if your application needs to switch
30languages on the fly, you probably want to use the class-based API
31instead.
32
Fred Draked576e9d2000-08-30 04:19:20 +000033\begin{funcdesc}{bindtextdomain}{domain\optional{, localedir}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +000034Bind the \var{domain} to the locale directory
35\var{localedir}. More concretely, \module{gettext} will look for
Fred Draked576e9d2000-08-30 04:19:20 +000036binary \file{.mo} files for the given domain using the path (on \UNIX):
Barry Warsaw0691a6b2000-08-30 03:27:10 +000037\file{\var{localedir}/\var{language}/LC_MESSAGES/\var{domain}.mo},
38where \var{languages} is searched for in the environment variables
Fred Draked576e9d2000-08-30 04:19:20 +000039\envvar{LANGUAGE}, \envvar{LC_ALL}, \envvar{LC_MESSAGES}, and
40\envvar{LANG} respectively.
Barry Warsaw0691a6b2000-08-30 03:27:10 +000041
Fred Draked576e9d2000-08-30 04:19:20 +000042If \var{localedir} is omitted or \code{None}, then the current binding
43for \var{domain} is returned.\footnote{
Fred Drake91f2f262001-07-06 19:28:48 +000044 The default locale directory is system dependent; for example,
45 on RedHat Linux it is \file{/usr/share/locale}, but on Solaris
46 it is \file{/usr/lib/locale}. The \module{gettext} module
47 does not try to support these system dependent defaults;
48 instead its default is \file{\code{sys.prefix}/share/locale}.
49 For this reason, it is always best to call
Fred Draked576e9d2000-08-30 04:19:20 +000050 \function{bindtextdomain()} with an explicit absolute path at
51 the start of your application.}
Barry Warsaw0691a6b2000-08-30 03:27:10 +000052\end{funcdesc}
53
Fred Draked576e9d2000-08-30 04:19:20 +000054\begin{funcdesc}{textdomain}{\optional{domain}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +000055Change or query the current global domain. If \var{domain} is
56\code{None}, then the current global domain is returned, otherwise the
57global domain is set to \var{domain}, which is returned.
58\end{funcdesc}
59
60\begin{funcdesc}{gettext}{message}
61Return the localized translation of \var{message}, based on the
62current global domain, language, and locale directory. This function
63is usually aliased as \function{_} in the local namespace (see
64examples below).
65\end{funcdesc}
66
67\begin{funcdesc}{dgettext}{domain, message}
68Like \function{gettext()}, but look the message up in the specified
69\var{domain}.
70\end{funcdesc}
71
72Note that GNU \program{gettext} also defines a \function{dcgettext()}
73method, but this was deemed not useful and so it is currently
74unimplemented.
75
76Here's an example of typical usage for this API:
77
78\begin{verbatim}
79import gettext
80gettext.bindtextdomain('myapplication', '/path/to/my/language/directory')
81gettext.textdomain('myapplication')
82_ = gettext.gettext
83# ...
84print _('This is a translatable string.')
85\end{verbatim}
86
87\subsection{Class-based API}
88
89The class-based API of the \module{gettext} module gives you more
90flexibility and greater convenience than the GNU \program{gettext}
91API. It is the recommended way of localizing your Python applications and
92modules. \module{gettext} defines a ``translations'' class which
93implements the parsing of GNU \file{.mo} format files, and has methods
94for returning either standard 8-bit strings or Unicode strings.
95Translations instances can also install themselves in the built-in
96namespace as the function \function{_()}.
97
Martin v. Löwisa55ffae2002-01-11 06:58:49 +000098\begin{funcdesc}{find}{domain\optional{, localedir\optional{,
99 languages\optional{, all}}}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000100This function implements the standard \file{.mo} file search
101algorithm. It takes a \var{domain}, identical to what
Barry Warsaw91b81c42001-10-18 19:41:48 +0000102\function{textdomain()} takes. Optional \var{localedir} is as in
103\function{bindtextdomain()} Optional \var{languages} is a list of
104strings, where each string is a language code.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000105
106If \var{localedir} is not given, then the default system locale
Fred Draked576e9d2000-08-30 04:19:20 +0000107directory is used.\footnote{See the footnote for
108\function{bindtextdomain()} above.} If \var{languages} is not given,
109then the following environment variables are searched: \envvar{LANGUAGE},
110\envvar{LC_ALL}, \envvar{LC_MESSAGES}, and \envvar{LANG}. The first one
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000111returning a non-empty value is used for the \var{languages} variable.
Barry Warsaw91b81c42001-10-18 19:41:48 +0000112The environment variables should contain a colon separated list of
113languages, which will be split on the colon to produce the expected
114list of language code strings.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000115
116\function{find()} then expands and normalizes the languages, and then
117iterates through them, searching for an existing file built of these
118components:
119
120\file{\var{localedir}/\var{language}/LC_MESSAGES/\var{domain}.mo}
121
122The first such file name that exists is returned by \function{find()}.
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000123If no such file is found, then \code{None} is returned. If \var{all}
124is given, it returns a list of all file names, in the order in which
125they appear in the languages list or the environment variables.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000126\end{funcdesc}
127
Fred Draked576e9d2000-08-30 04:19:20 +0000128\begin{funcdesc}{translation}{domain\optional{, localedir\optional{,
Martin v. Löwis1be64192002-01-11 06:33:28 +0000129 languages\optional{,
130 class_,\optional{fallback}}}}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000131Return a \class{Translations} instance based on the \var{domain},
132\var{localedir}, and \var{languages}, which are first passed to
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000133\function{find()} to get a list of the
134associated \file{.mo} file paths. Instances with
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000135identical \file{.mo} file names are cached. The actual class instantiated
136is either \var{class_} if provided, otherwise
137\class{GNUTranslations}. The class's constructor must take a single
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000138file object argument.
139
140If multiple files are found, later files are used as fallbacks for
141earlier ones. To allow setting the fallback, \function{copy.copy}
142is used to clone each translation object from the cache; the actual
143instance data is still shared with the cache.
144
145If no \file{.mo} file is found, this function raises
146\exception{IOError} if \var{fallback} is false (which is the default),
147and returns a \class{NullTranslations} instance if \var{fallback} is
148true.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000149\end{funcdesc}
150
Fred Draked576e9d2000-08-30 04:19:20 +0000151\begin{funcdesc}{install}{domain\optional{, localedir\optional{, unicode}}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000152This installs the function \function{_} in Python's builtin namespace,
153based on \var{domain}, and \var{localedir} which are passed to the
154function \function{translation()}. The \var{unicode} flag is passed to
155the resulting translation object's \method{install} method.
156
157As seen below, you usually mark the strings in your application that are
Fred Drake91f2f262001-07-06 19:28:48 +0000158candidates for translation, by wrapping them in a call to the
159\function{_()} function, like this:
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000160
161\begin{verbatim}
162print _('This string will be translated.')
163\end{verbatim}
164
165For convenience, you want the \function{_()} function to be installed in
166Python's builtin namespace, so it is easily accessible in all modules
167of your application.
168\end{funcdesc}
169
170\subsubsection{The \class{NullTranslations} class}
171Translation classes are what actually implement the translation of
172original source file message strings to translated message strings.
173The base class used by all translation classes is
174\class{NullTranslations}; this provides the basic interface you can use
175to write your own specialized translation classes. Here are the
176methods of \class{NullTranslations}:
177
Fred Draked576e9d2000-08-30 04:19:20 +0000178\begin{methoddesc}[NullTranslations]{__init__}{\optional{fp}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000179Takes an optional file object \var{fp}, which is ignored by the base
180class. Initializes ``protected'' instance variables \var{_info} and
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000181\var{_charset} which are set by derived classes, as well as \var{_fallback},
182which is set through \method{add_fallback}. It then calls
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000183\code{self._parse(fp)} if \var{fp} is not \code{None}.
184\end{methoddesc}
185
186\begin{methoddesc}[NullTranslations]{_parse}{fp}
187No-op'd in the base class, this method takes file object \var{fp}, and
188reads the data from the file, initializing its message catalog. If
189you have an unsupported message catalog file format, you should
190override this method to parse your format.
191\end{methoddesc}
192
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000193\begin{methoddesc}{NullTranslations}{add_fallback}{fallback}
194Add \var{fallback} as the fallback object for the current translation
195object. A translation object should consult the fallback if it cannot
196provide a translation for a given message.
197\end{methoddesc}
198
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000199\begin{methoddesc}[NullTranslations]{gettext}{message}
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000200If a fallback has been set, forward \method{gettext} to the fallback.
201Otherwise, return the translated message. Overridden in derived classes.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000202\end{methoddesc}
203
204\begin{methoddesc}[NullTranslations]{ugettext}{message}
Martin v. Löwisa55ffae2002-01-11 06:58:49 +0000205If a fallback has been set, forward \method{ugettext} to the fallback.
206Otherwise, return the translated message as a Unicode string.
207Overridden in derived classes.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000208\end{methoddesc}
209
210\begin{methoddesc}[NullTranslations]{info}{}
Fred Draked576e9d2000-08-30 04:19:20 +0000211Return the ``protected'' \member{_info} variable.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000212\end{methoddesc}
213
214\begin{methoddesc}[NullTranslations]{charset}{}
Fred Draked576e9d2000-08-30 04:19:20 +0000215Return the ``protected'' \member{_charset} variable.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000216\end{methoddesc}
217
Fred Draked576e9d2000-08-30 04:19:20 +0000218\begin{methoddesc}[NullTranslations]{install}{\optional{unicode}}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000219If the \var{unicode} flag is false, this method installs
Fred Draked576e9d2000-08-30 04:19:20 +0000220\method{self.gettext()} into the built-in namespace, binding it to
221\samp{_}. If \var{unicode} is true, it binds \method{self.ugettext()}
222instead. By default, \var{unicode} is false.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000223
224Note that this is only one way, albeit the most convenient way, to
225make the \function{_} function available to your application. Because it
226affects the entire application globally, and specifically the built-in
227namespace, localized modules should never install \function{_}.
228Instead, they should use this code to make \function{_} available to
229their module:
230
231\begin{verbatim}
232import gettext
233t = gettext.translation('mymodule', ...)
234_ = t.gettext
235\end{verbatim}
236
237This puts \function{_} only in the module's global namespace and so
238only affects calls within this module.
239\end{methoddesc}
240
241\subsubsection{The \class{GNUTranslations} class}
242
243The \module{gettext} module provides one additional class derived from
244\class{NullTranslations}: \class{GNUTranslations}. This class
245overrides \method{_parse()} to enable reading GNU \program{gettext}
246format \file{.mo} files in both big-endian and little-endian format.
247
248It also parses optional meta-data out of the translation catalog. It
249is convention with GNU \program{gettext} to include meta-data as the
Fred Draked576e9d2000-08-30 04:19:20 +0000250translation for the empty string. This meta-data is in \rfc{822}-style
251\code{key: value} pairs. If the key \code{Content-Type} is found,
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000252then the \code{charset} property is used to initialize the
Fred Draked576e9d2000-08-30 04:19:20 +0000253``protected'' \member{_charset} instance variable. The entire set of
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000254key/value pairs are placed into a dictionary and set as the
Fred Draked576e9d2000-08-30 04:19:20 +0000255``protected'' \member{_info} instance variable.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000256
257If the \file{.mo} file's magic number is invalid, or if other problems
258occur while reading the file, instantiating a \class{GNUTranslations} class
259can raise \exception{IOError}.
260
261The other usefully overridden method is \method{ugettext()}, which
262returns a Unicode string by passing both the translated message string
Fred Draked576e9d2000-08-30 04:19:20 +0000263and the value of the ``protected'' \member{_charset} variable to the
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000264builtin \function{unicode()} function.
265
Fred Draked0726c32000-09-07 18:55:08 +0000266\subsubsection{Solaris message catalog support}
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000267
268The Solaris operating system defines its own binary
269\file{.mo} file format, but since no documentation can be found on
270this format, it is not supported at this time.
271
272\subsubsection{The Catalog constructor}
273
Fred Draked0726c32000-09-07 18:55:08 +0000274GNOME\index{GNOME} uses a version of the \module{gettext} module by
275James Henstridge, but this version has a slightly different API. Its
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000276documented usage was:
277
278\begin{verbatim}
279import gettext
280cat = gettext.Catalog(domain, localedir)
281_ = cat.gettext
282print _('hello world')
283\end{verbatim}
284
285For compatibility with this older module, the function
286\function{Catalog()} is an alias for the the \function{translation()}
287function described above.
288
289One difference between this module and Henstridge's: his catalog
290objects supported access through a mapping API, but this appears to be
291unused and so is not currently supported.
292
293\subsection{Internationalizing your programs and modules}
294Internationalization (I18N) refers to the operation by which a program
295is made aware of multiple languages. Localization (L10N) refers to
296the adaptation of your program, once internationalized, to the local
297language and cultural habits. In order to provide multilingual
298messages for your Python programs, you need to take the following
299steps:
300
301\begin{enumerate}
302 \item prepare your program or module by specially marking
303 translatable strings
304 \item run a suite of tools over your marked files to generate raw
305 messages catalogs
306 \item create language specific translations of the message catalogs
307 \item use the \module{gettext} module so that message strings are
308 properly translated
309\end{enumerate}
310
311In order to prepare your code for I18N, you need to look at all the
312strings in your files. Any string that needs to be translated
Fred Drake91f2f262001-07-06 19:28:48 +0000313should be marked by wrapping it in \code{_('...')} --- that is, a call
314to the function \function{_()}. For example:
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000315
316\begin{verbatim}
317filename = 'mylog.txt'
318message = _('writing a log message')
319fp = open(filename, 'w')
320fp.write(message)
321fp.close()
322\end{verbatim}
323
Fred Draked576e9d2000-08-30 04:19:20 +0000324In this example, the string \code{'writing a log message'} is marked as
325a candidate for translation, while the strings \code{'mylog.txt'} and
326\code{'w'} are not.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000327
Barry Warsawb4162902001-01-31 21:21:45 +0000328The Python distribution comes with two tools which help you generate
329the message catalogs once you've prepared your source code. These may
330or may not be available from a binary distribution, but they can be
331found in a source distribution, in the \file{Tools/i18n} directory.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000332
Barry Warsawb4162902001-01-31 21:21:45 +0000333The \program{pygettext}\footnote{Fran\c cois Pinard has
334written a program called
Barry Warsawddef8882000-09-13 12:04:47 +0000335\program{xpot} which does a similar job. It is available as part of
336his \program{po-utils} package at
Barry Warsawb4162902001-01-31 21:21:45 +0000337\url{http://www.iro.umontreal.ca/contrib/po-utils/HTML}.} program
338scans all your Python source code looking for the strings you
339previously marked as translatable. It is similar to the GNU
340\program{gettext} program except that it understands all the
341intricacies of Python source code, but knows nothing about C or C++
342source code. You don't need GNU \code{gettext} unless you're also
Fred Drake91f2f262001-07-06 19:28:48 +0000343going to be translating C code (such as C extension modules).
Barry Warsawb4162902001-01-31 21:21:45 +0000344
345\program{pygettext} generates textual Uniforum-style human readable
346message catalog \file{.pot} files, essentially structured human
347readable files which contain every marked string in the source code,
348along with a placeholder for the translation strings.
349\program{pygettext} is a command line script that supports a similar
350command line interface as \program{xgettext}; for details on its use,
351run:
352
353\begin{verbatim}
354pygettext.py --help
355\end{verbatim}
356
357Copies of these \file{.pot} files are then handed over to the
358individual human translators who write language-specific versions for
359every supported natural language. They send you back the filled in
360language-specific versions as a \file{.po} file. Using the
361\program{msgfmt.py}\footnote{\program{msgfmt.py} is binary
362compatible with GNU \program{msgfmt} except that it provides a
363simpler, all-Python implementation. With this and
364\program{pygettext.py}, you generally won't need to install the GNU
365\program{gettext} package to internationalize your Python
366applications.} program (in the \file{Tools/i18n} directory), you take the
367\file{.po} files from your translators and generate the
368machine-readable \file{.mo} binary catalog files. The \file{.mo}
369files are what the \module{gettext} module uses for the actual
370translation processing during run-time.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000371
372How you use the \module{gettext} module in your code depends on
373whether you are internationalizing your entire application or a single
374module.
375
376\subsubsection{Localizing your module}
377
378If you are localizing your module, you must take care not to make
379global changes, e.g. to the built-in namespace. You should not use
Fred Draked576e9d2000-08-30 04:19:20 +0000380the GNU \code{gettext} API but instead the class-based API.
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000381
382Let's say your module is called ``spam'' and the module's various
383natural language translation \file{.mo} files reside in
Fred Draked576e9d2000-08-30 04:19:20 +0000384\file{/usr/share/locale} in GNU \program{gettext} format. Here's what
385you would put at the top of your module:
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000386
387\begin{verbatim}
388import gettext
389t = gettext.translation('spam', '/usr/share/locale')
390_ = t.gettext
391\end{verbatim}
392
393If your translators were providing you with Unicode strings in their
394\file{.po} files, you'd instead do:
395
396\begin{verbatim}
397import gettext
398t = gettext.translation('spam', '/usr/share/locale')
399_ = t.ugettext
400\end{verbatim}
401
402\subsubsection{Localizing your application}
403
404If you are localizing your application, you can install the \function{_()}
405function globally into the built-in namespace, usually in the main driver file
406of your application. This will let all your application-specific
407files just use \code{_('...')} without having to explicitly install it in
408each file.
409
410In the simple case then, you need only add the following bit of code
411to the main driver file of your application:
412
413\begin{verbatim}
414import gettext
415gettext.install('myapplication')
416\end{verbatim}
417
Fred Draked576e9d2000-08-30 04:19:20 +0000418If you need to set the locale directory or the \var{unicode} flag,
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000419you can pass these into the \function{install()} function:
420
421\begin{verbatim}
422import gettext
423gettext.install('myapplication', '/usr/share/locale', unicode=1)
424\end{verbatim}
425
426\subsubsection{Changing languages on the fly}
427
428If your program needs to support many languages at the same time, you
429may want to create multiple translation instances and then switch
430between them explicitly, like so:
431
432\begin{verbatim}
433import gettext
434
435lang1 = gettext.translation(languages=['en'])
436lang2 = gettext.translation(languages=['fr'])
437lang3 = gettext.translation(languages=['de'])
438
439# start by using language1
440lang1.install()
441
442# ... time goes by, user selects language 2
443lang2.install()
444
445# ... more time goes by, user selects language 3
446lang3.install()
447\end{verbatim}
448
449\subsubsection{Deferred translations}
450
451In most coding situations, strings are translated were they are coded.
452Occasionally however, you need to mark strings for translation, but
453defer actual translation until later. A classic example is:
454
455\begin{verbatim}
456animals = ['mollusk',
457 'albatross',
458 'rat',
459 'penguin',
460 'python',
461 ]
462# ...
463for a in animals:
464 print a
465\end{verbatim}
466
467Here, you want to mark the strings in the \code{animals} list as being
468translatable, but you don't actually want to translate them until they
469are printed.
470
471Here is one way you can handle this situation:
472
473\begin{verbatim}
474def _(message): return message
475
476animals = [_('mollusk'),
477 _('albatross'),
478 _('rat'),
479 _('penguin'),
480 _('python'),
481 ]
482
483del _
484
485# ...
486for a in animals:
487 print _(a)
488\end{verbatim}
489
490This works because the dummy definition of \function{_()} simply returns
491the string unchanged. And this dummy definition will temporarily
492override any definition of \function{_()} in the built-in namespace
Fred Draked576e9d2000-08-30 04:19:20 +0000493(until the \keyword{del} command).
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000494Take care, though if you have a previous definition of \function{_} in
495the local namespace.
496
497Note that the second use of \function{_()} will not identify ``a'' as
498being translatable to the \program{pygettext} program, since it is not
499a string.
500
501Another way to handle this is with the following example:
502
503\begin{verbatim}
504def N_(message): return message
505
506animals = [N_('mollusk'),
507 N_('albatross'),
508 N_('rat'),
509 N_('penguin'),
510 N_('python'),
511 ]
512
513# ...
514for a in animals:
515 print _(a)
516\end{verbatim}
517
518In this case, you are marking translatable strings with the function
Fred Draked576e9d2000-08-30 04:19:20 +0000519\function{N_()},\footnote{The choice of \function{N_()} here is totally
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000520arbitrary; it could have just as easily been
Fred Draked576e9d2000-08-30 04:19:20 +0000521\function{MarkThisStringForTranslation()}.
522} which won't conflict with any definition of
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000523\function{_()}. However, you will need to teach your message extraction
524program to look for translatable strings marked with \function{N_()}.
525\program{pygettext} and \program{xpot} both support this through the
526use of command line switches.
527
528\subsection{Acknowledgements}
529
530The following people contributed code, feedback, design suggestions,
531previous implementations, and valuable experience to the creation of
532this module:
533
534\begin{itemize}
535 \item Peter Funk
536 \item James Henstridge
Fred Draked576e9d2000-08-30 04:19:20 +0000537 \item Marc-Andr\'e Lemburg
Barry Warsaw0691a6b2000-08-30 03:27:10 +0000538 \item Martin von L\"owis
539 \item Fran\c cois Pinard
540 \item Barry Warsaw
541\end{itemize}