@contents
@ifset makeinfo
-@node Top, Introduction, (dir), (dir)
+@node Top
@top GNU @code{gettext} utilities
This manual documents the GNU gettext tools and the GNU libintl library,
@end ifset
-@node Introduction, Users, Top, Top
+@node Introduction
@chapter Introduction
This chapter explains the goals sought in the creation
* Overview:: Overview of GNU @code{gettext}
@end menu
-@node Why, Concepts, Introduction, Introduction
+@node Why
@section The Purpose of GNU @code{gettext}
Usually, programs are written and documented in English, and use
@code{gettext} is related to the remainder of the Translation
Project, and consequently, have a glimpse at the @emph{big picture}.
-@node Concepts, Aspects, Why, Introduction
+@node Concepts
@section I18n, L10n, and Such
@cindex i18n
internationalization is usually taken care of by programmers, and
localization is usually taken care of by translators.
-@node Aspects, Files, Concepts, Introduction
+@node Aspects
@section Aspects in Native Language Support
@cindex translation aspects
fully implements this, and most other modern systems provide a more
or less reasonable support for at least some of the missing components.
-@node Files, Overview, Aspects, Introduction
+@node Files
@section Files Conveying Translations
@cindex files, @file{.po} and @file{.mo}
@file{.gmo} are really MO files, when it is known that these files use
the GNU format.
-@node Overview, , Files, Introduction
+@node Overview
@section Overview of GNU @code{gettext}
@cindex overview of @code{gettext}
The remainder of this manual has the purpose of explaining in depth the various
steps outlined above.
-@node Users, PO Files, Introduction, Top
+@node Users
@chapter The User's View
Nowadays, when users log into a computer, they usually find that all
* Installing Localizations:: How to Install Additional Translations
@end menu
-@node System Installation, Setting the GUI Locale, Users, Users
+@node System Installation
@section Operating System Installation
The default language is often already specified during operating system
same machine. He can specify it, typically after the first login, as
described in the next section.
-@node Setting the GUI Locale, Setting the POSIX Locale, System Installation, Users
+@node Setting the GUI Locale
@section Setting the Locale Used by GUI Programs
The immediately available programs in a user's desktop come from a group
KDE, however, the locale is specified through a variable @code{KDE_LANG},
rather than @code{LANG} or @code{LC_ALL}.
-@node Setting the POSIX Locale, Installing Localizations, Setting the GUI Locale, Users
+@node Setting the POSIX Locale
@section Setting the Locale through Environment Variables
As a user, if your language has been installed for this package, in the
* The LANGUAGE variable:: How to Specify a Priority List of Languages
@end menu
-@node Locale Names, Locale Environment Variables, Setting the POSIX Locale, Setting the POSIX Locale
+@node Locale Names
@subsection Locale Names
A locale name usually has the form @samp{@var{ll}_@var{CC}}. Here
encoding (often US-ASCII, but sometimes also ISO-8859-1 or UTF-8, depending on
the operating system).
-@node Locale Environment Variables, The LANGUAGE variable, Locale Names, Setting the POSIX Locale
+@node Locale Environment Variables
@subsection Locale Environment Variables
@cindex setting up @code{gettext} at run time
@cindex selecting message language
The @code{LANGUAGE} variable is described in the next subsection.
-@node The LANGUAGE variable, , Locale Environment Variables, Setting the POSIX Locale
+@node The LANGUAGE variable
@subsection Specifying a Priority List of Languages
Not all programs have translations for all languages. By default, an
@code{LANG} (or @code{LC_ALL}) to a value other than @samp{C}, before you can
use a language priority list through the @code{LANGUAGE} variable.
-@node Installing Localizations, , Setting the POSIX Locale, Users
+@node Installing Localizations
@section Installing Translations for Particular Programs
@cindex Translation Matrix
@cindex available translations
directory called @file{po/}. Each @file{@var{ll}.po} file contains the
message translations for the language whose abbreviation of @var{ll}.
-@node PO Files, Sources, Users, Top
+@node PO Files
@chapter The Format of PO Files
@cindex PO files' format
@cindex file format, @file{.po}
tools, and might disappear or be replaced unexpectedly when the PO
file is given to @code{msgmerge}.
-@node Sources, Template, PO Files, Top
+@node Sources
@chapter Preparing Program Sources
@cindex preparing programs for translation
* Libraries:: Preparing Library Sources
@end menu
-@node Importing, Triggering, Sources, Sources
+@node Importing
@section Importing the @code{gettext} declaration
Presuming that your set of programs, or package, has been adjusted
#include <libintl.h>
@end example
-@node Triggering, Preparing Strings, Importing, Sources
+@node Triggering
@section Triggering @code{gettext} Operations
@cindex initialization
is needed in a large program's source, and because switching a locale
is not multithread-safe.
-@node Preparing Strings, Mark Keywords, Triggering, Sources
+@node Preparing Strings
@section Preparing Translatable Strings
@cindex marking strings, preparations
translatable strings. But please bear in mind that the GNU gettext tools
don't verify that the translations are well-formed HTML.
-@node Mark Keywords, Marking, Preparing Strings, Sources
+@node Mark Keywords
@section How Marks Appear in Sources
@cindex marking strings that require translation
@samp{"%s: %d"} @emph{does} require translation, because in French, unlike
in English, it's customary to put a space before a colon.
-@node Marking, c-format Flag, Mark Keywords, Sources
+@node Marking
@section Marking Translatable Strings
@emindex marking strings for translation
is preferred for the @kbd{M-.} command. In fact, this is not useful to
prefer @samp{_}, as this one is already built in the @kbd{M-,} command.
-@node c-format Flag, Special cases, Marking, Sources
+@node c-format Flag
@section Special Comments preceding Keywords
@c FIXME document c-format and no-c-format.
@ref{xgettext Invocation} to see how the @code{--debug} option can be
used for solving this problem.
-@node Special cases, Bug Report Address, c-format Flag, Sources
+@node Special cases
@section Special Cases of Translatable Strings
@cindex marking string initializers
generally not very difficult. If it should be in any situation you can
use this second method in this situation.
-@node Bug Report Address, Names, Special cases, Sources
+@node Bug Report Address
@section Letting Users Report Translation Bugs
Code sometimes has bugs, but translations sometimes have bugs too. The
@end group
@end example
-@node Names, Libraries, Bug Report Address, Sources
+@node Names
@section Marking Proper Names for Translation
Should names of persons, cities, locations etc. be marked for translation
Because translation of names is such a sensitive domain, it is a good
idea to test your translation before submitting it.
-@node Libraries, , Names, Sources
+@node Libraries
@section Preparing Library Sources
When you are preparing a library, not a program, for the use of
@code{ngettext} function.
@end enumerate
-@node Template, Creating, Sources, Top
+@node Template
@chapter Making the PO Template File
@cindex PO template file
* xgettext Invocation:: Invoking the @code{xgettext} Program
@end menu
-@node xgettext Invocation, , Template, Template
+@node xgettext Invocation
@section Invoking the @code{xgettext} Program
@include xgettext.texi
-@node Creating, Updating, Template, Top
+@node Creating
@chapter Creating a New PO File
@cindex creating a new PO file
* Header Entry:: Filling in the Header Entry
@end menu
-@node msginit Invocation, Header Entry, Creating, Creating
+@node msginit Invocation
@section Invoking the @code{msginit} Program
@include msginit.texi
-@node Header Entry, , msginit Invocation, Creating
+@node Header Entry
@section Filling in the Header Entry
@cindex header entry of a PO file
@ref{Translating plural forms}.
@end table
-@node Updating, Editing, Creating, Top
+@node Updating
@chapter Updating Existing PO Files
@menu
* msgmerge Invocation:: Invoking the @code{msgmerge} Program
@end menu
-@node msgmerge Invocation, , Updating, Updating
+@node msgmerge Invocation
@section Invoking the @code{msgmerge} Program
@include msgmerge.texi
-@node Editing, Manipulating, Updating, Top
+@node Editing
@chapter Editing PO Files
@cindex Editing PO Files
* Compendium:: Using Translation Compendia
@end menu
-@node KBabel, Gtranslator, Editing, Editing
+@node KBabel
@section KDE's PO File Editor
@cindex KDE PO file editor
-@node Gtranslator, PO Mode, KBabel, Editing
+@node Gtranslator
@section GNOME's PO File Editor
@cindex GNOME PO file editor
-@node PO Mode, Compendium, Gtranslator, Editing
+@node PO Mode
@section Emacs's PO File Editor
@cindex Emacs PO Mode
* Auxiliary:: Consulting Auxiliary PO Files
@end menu
-@node Installation, Main PO Commands, PO Mode, PO Mode
+@node Installation
@subsection Completing GNU @code{gettext} Installation
@cindex installing @code{gettext}
of international characters, try a different font set (via Shift Mouse
button 1).
-@node Main PO Commands, Entry Positioning, Installation, PO Mode
+@node Main PO Commands
@subsection Main PO mode Commands
@cindex PO mode (Emacs) commands
Once the cursor is on the line in error, the translator may decide on
any PO mode action which would help correcting the error.
-@node Entry Positioning, Normalizing, Main PO Commands, PO Mode
+@node Entry Positioning
@subsection Entry Positioning
@emindex current entry of a PO file
first entry, use @kbd{m}, then position to the second entry, and
merely use @kbd{x} for making the switch.
-@node Normalizing, Translated Entries, Entry Positioning, PO Mode
+@node Normalizing
@subsection Normalizing Strings in Entries
@cindex string normalization in entries
There are a few yet undecided little points about string normalization,
to be documented in this manual, once these questions settle.
-@node Translated Entries, Fuzzy Entries, Normalizing, PO Mode
+@node Translated Entries
@subsection Translated Entries
@cindex translated entries
be later unfuzzied before becoming an official, genuine translated entry.
@xref{Fuzzy Entries}.
-@node Fuzzy Entries, Untranslated Entries, Translated Entries, PO Mode
+@node Fuzzy Entries
@subsection Fuzzy Entries
@cindex fuzzy entries
command, the translator is asked for confirmation, if fuzzy string
still exists.
-@node Untranslated Entries, Obsolete Entries, Fuzzy Entries, PO Mode
+@node Untranslated Entries
@subsection Untranslated Entries
@cindex untranslated entries
with the @kbd{q} command, the translator is asked for confirmation,
if some untranslated string still exists.
-@node Obsolete Entries, Modifying Translations, Untranslated Entries, PO Mode
+@node Obsolete Entries
@subsection Obsolete Entries
@cindex obsolete entries
when the time comes to find the adequate obsolete translation, it
merely tries to provide handy tools for helping her to do so.
-@node Modifying Translations, Modifying Comments, Obsolete Entries, PO Mode
+@node Modifying Translations
@subsection Modifying Translations
@cindex editing translations
@emindex editing translations
capability of learning these sequences and playing them back under request.
@xref{Keyboard Macros, , , emacs, The Emacs Editor}.
-@node Modifying Comments, Subedit, Modifying Translations, PO Mode
+@node Modifying Comments
@subsection Modifying Comments
@cindex editing comments in PO files
@emindex editing comments
regular Emacs commands @kbd{C-y} (@code{yank}) and @kbd{M-y}
(@code{yank-pop}) to get the previous translation where she likes.
-@node Subedit, C Sources Context, Modifying Comments, PO Mode
+@node Subedit
@subsection Details of Sub Edition
@emindex subedit minor mode
translator asks for quitting the PO file (with the @kbd{q} command), subedits
are automatically resumed one at a time, so she may decide for each of them.
-@node C Sources Context, Auxiliary, Subedit, PO Mode
+@node C Sources Context
@subsection C Sources Context
@emindex consulting program sources
@emindex looking at the source to aid translation
@kbd{M-S} (@code{po-ignore-source-path}) is used to select, with completion,
one of the directories she does not want anymore on the search path.
-@node Auxiliary, , C Sources Context, PO Mode
+@node Auxiliary
@subsection Consulting Auxiliary PO Files
@emindex consulting translations to other languages
discrepancies between PO mode and other GNU @code{gettext} tools get
fully resolved, the translator should stay aware of normalisation issues.
-@node Compendium, , PO Mode, Editing
+@node Compendium
@section Using Translation Compendia
@emindex using translation compendia
* Using Compendia:: Using older translations if they fit
@end menu
-@node Creating Compendia, Using Compendia, Compendium, Compendium
+@node Creating Compendia
@subsection Creating Compendia
@cindex creating compendia
@cindex compendium, creating
msggrep --location src/getopt.c -o compendium.po file.po
@end example
-@node Using Compendia, , Creating Compendia, Compendium
+@node Using Compendia
@subsection Using Compendia
You can use a compendium file to initialize a translation from scratch
msgmerge update.po file.pot | msgattrib --no-obsolete > file.po
@end example
-@node Manipulating, Binaries, Editing, Top
+@node Manipulating
@chapter Manipulating PO Files
@cindex manipulating PO files
* libgettextpo:: Writing your own programs that process PO files
@end menu
-@node msgcat Invocation, msgconv Invocation, Manipulating, Manipulating
+@node msgcat Invocation
@section Invoking the @code{msgcat} Program
@include msgcat.texi
-@node msgconv Invocation, msggrep Invocation, msgcat Invocation, Manipulating
+@node msgconv Invocation
@section Invoking the @code{msgconv} Program
@include msgconv.texi
-@node msggrep Invocation, msgfilter Invocation, msgconv Invocation, Manipulating
+@node msggrep Invocation
@section Invoking the @code{msggrep} Program
@include msggrep.texi
-@node msgfilter Invocation, msguniq Invocation, msggrep Invocation, Manipulating
+@node msgfilter Invocation
@section Invoking the @code{msgfilter} Program
@include msgfilter.texi
-@node msguniq Invocation, msgcomm Invocation, msgfilter Invocation, Manipulating
+@node msguniq Invocation
@section Invoking the @code{msguniq} Program
@include msguniq.texi
-@node msgcomm Invocation, msgcmp Invocation, msguniq Invocation, Manipulating
+@node msgcomm Invocation
@section Invoking the @code{msgcomm} Program
@include msgcomm.texi
-@node msgcmp Invocation, msgattrib Invocation, msgcomm Invocation, Manipulating
+@node msgcmp Invocation
@section Invoking the @code{msgcmp} Program
@include msgcmp.texi
-@node msgattrib Invocation, msgen Invocation, msgcmp Invocation, Manipulating
+@node msgattrib Invocation
@section Invoking the @code{msgattrib} Program
@include msgattrib.texi
-@node msgen Invocation, msgexec Invocation, msgattrib Invocation, Manipulating
+@node msgen Invocation
@section Invoking the @code{msgen} Program
@include msgen.texi
-@node msgexec Invocation, Colorizing, msgen Invocation, Manipulating
+@node msgexec Invocation
@section Invoking the @code{msgexec} Program
@include msgexec.texi
-@node Colorizing, libgettextpo, msgexec Invocation, Manipulating
+@node Colorizing
@section Highlighting parts of PO files
Translators are usually only interested in seeing the untranslated and
* Customizing less:: Customizing @code{less} for viewing PO files
@end menu
-@node The --color option, The TERM variable, Colorizing, Colorizing
+@node The --color option
@subsection The @code{--color} option
@opindex --color@r{, @code{msgcat} option}
you therefore normally don't need to save output produced with the
@code{--color} option in a file.
-@node The TERM variable, The --style option, The --color option, Colorizing
+@node The TERM variable
@subsection The environment variable @code{TERM}
@vindex TERM@r{, environment variable}
@samp{msgcat --color=test} and seeing whether the output looks like a
reasonable color map.
-@node The --style option, Style rules, The TERM variable, Colorizing
+@node The --style option
@subsection The @code{--style} option
@opindex --style@r{, @code{msgcat} option}
You can also design your own styles. This is described in the next section.
-@node Style rules, Customizing less, The --style option, Colorizing
+@node Style rules
@subsection Style rules for PO files
The same style file can be used for styling of a PO file, for terminal
@code{underline}.
@end table
-@node Customizing less, , Style rules, Colorizing
+@node Customizing less
@subsection Customizing @code{less} for viewing PO files
The @samp{less} program is a popular text file browser for use in a text
@end smallexample
@end enumerate
-@node libgettextpo, , Colorizing, Manipulating
+@node libgettextpo
@section Writing your own programs that process PO files
For the tasks for which a combination of @samp{msgattrib}, @samp{msgcat} etc.
po_file_free (file);
@end example
-@node Binaries, Programmers, Manipulating, Top
+@node Binaries
@chapter Producing Binary MO Files
@c FIXME: Rewrite.
* MO Files:: The Format of GNU MO Files
@end menu
-@node msgfmt Invocation, msgunfmt Invocation, Binaries, Binaries
+@node msgfmt Invocation
@section Invoking the @code{msgfmt} Program
@include msgfmt.texi
-@node msgunfmt Invocation, MO Files, msgfmt Invocation, Binaries
+@node msgunfmt Invocation
@section Invoking the @code{msgunfmt} Program
@include msgunfmt.texi
-@node MO Files, , msgunfmt Invocation, Binaries
+@node MO Files
@section The Format of GNU MO Files
@cindex MO file's format
@cindex file format, @file{.mo}
@end group
@end example
-@node Programmers, Translators, Binaries, Top
+@node Programmers
@chapter The Programmer's View
@c FIXME: Reorganize whole chapter.
* Temp Programmers:: Temporary Notes for the Programmers Chapter
@end menu
-@node catgets, gettext, Programmers, Programmers
+@node catgets
@section About @code{catgets}
@cindex @code{catgets}, X/Open specification
* Problems with catgets:: Problems with the @code{catgets} interface?!
@end menu
-@node Interface to catgets, Problems with catgets, catgets, catgets
+@node Interface to catgets
@subsection The Interface
@cindex interface to @code{catgets}
After this no @code{catgets} call using the descriptor is legal anymore.
-@node Problems with catgets, , Interface to catgets, catgets
+@node Problems with catgets
@subsection Problems with the @code{catgets} Interface?!
@cindex problems with @code{catgets} interface
want to say that the other approach has no problems but they are far
more easy to manage.
-@node gettext, Comparison, catgets, Programmers
+@node gettext
@section About @code{gettext}
@cindex @code{gettext}, a programmer's view
* Optimized gettext:: Optimization of the *gettext functions
@end menu
-@node Interface to gettext, Ambiguities, gettext, gettext
+@node Interface to gettext
@subsection The Interface
@cindex @code{gettext} interface
filtered through the gettext function. That's all, the package speaks
your language.
-@node Ambiguities, Locating Catalogs, Interface to gettext, gettext
+@node Ambiguities
@subsection Solving Ambiguities
@cindex several domains
@cindex domain ambiguities
paths should always be avoided to avoid dependencies and
unreliabilities.
-@node Locating Catalogs, Charset conversion, Ambiguities, gettext
+@node Locating Catalogs
@subsection Locating Message Catalog Files
@cindex message catalog files location
When using the function @code{dcgettext}, you can specify the locale category
through the third argument.
-@node Charset conversion, Contexts, Locating Catalogs, gettext
+@node Charset conversion
@subsection How to specify the output character set @code{gettext} uses
@cindex charset conversion at runtime
@cindex encoding conversion at runtime
global variable @var{errno} is set accordingly.
@end deftypefun
-@node Contexts, Plural forms, Charset conversion, gettext
+@node Contexts
@subsection Using contexts for solving ambiguities
@cindex context
@cindex GUI programs
are string literals, the macros without the @samp{_expr} suffix are more
efficient.
-@node Plural forms, Optimized gettext, Contexts, gettext
+@node Plural forms
@subsection Additional functions for plural forms
@cindex plural forms
The translators' perspective regarding plural forms is explained in
@ref{Translating plural forms}.
-@node Optimized gettext, , Plural forms, gettext
+@node Optimized gettext
@subsection Optimization of the *gettext functions
@cindex optimization of @code{gettext} functions
catalogs being loaded in between, @code{gettext} will, the second time,
find the result through a single cache lookup.
-@node Comparison, Using libintl.a, gettext, Programmers
+@node Comparison
@section Comparing the Two Interfaces
@cindex @code{gettext} vs @code{catgets}
@cindex comparison of interfaces
but @code{gettext} has another, scalable approach for solving ambiguities
of this kind: @xref{Ambiguities}.
-@node Using libintl.a, gettext grok, Comparison, Programmers
+@node Using libintl.a
@section Using libintl.a in own programs
Starting with version 0.9.4 the library @code{libintl.h} should be
providing additional functions. The @file{Makefile} will put the header
and the library in directories selected using the @code{$(prefix)}.
-@node gettext grok, Temp Programmers, Using libintl.a, Programmers
+@node gettext grok
@section Being a @code{gettext} grok
@strong{ NOTE: } This documentation section is outdated and needs to be
@end itemize
-@node Temp Programmers, , gettext grok, Programmers
+@node Temp Programmers
@section Temporary Notes for the Programmers Chapter
@strong{ NOTE: } This documentation section is outdated and needs to be
* Temp Notes:: Temporary - Notes
@end menu
-@node Temp Implementations, Temp catgets, Temp Programmers, Temp Programmers
+@node Temp Implementations
@subsection Temporary - Two Possible Implementations
There are two competing methods for language independent messages:
set of interfaces over the other. For more on this topic please
see the Programming for Internationalization FAQ.
-@node Temp catgets, Temp WSI, Temp Implementations, Temp Programmers
+@node Temp catgets
@subsection Temporary - About @code{catgets}
There have been a few discussions of late on the use of
is a part of Spec1170 and hence will become a standardized component
of all Unix systems.
-@node Temp WSI, Temp Notes, Temp catgets, Temp Programmers
+@node Temp WSI
@subsection Temporary - Why a single implementation
Now it seems kind of wasteful to me to have two different systems
compatibility with the past with useful improvements and innovations for
the future.
-@node Temp Notes, , Temp WSI, Temp Programmers
+@node Temp Notes
@subsection Temporary - Notes
X/Open agreed very late on the standard form so that many
making the GNU/Linux @code{libc} @code{gettext} functions. So in future
Solaris is not the only system having @code{gettext}.
-@node Translators, Maintainers, Programmers, Top
+@node Translators
@chapter The Translator's View
@c FIXME: Reorganize whole chapter.
* Prioritizing messages:: How to find which messages to translate first
@end menu
-@node Trans Intro 0, Trans Intro 1, Translators, Translators
+@node Trans Intro 0
@section Introduction 0
@strong{ NOTE: } This documentation section is outdated and needs to be
@file{coordinator@@translationproject.org} indicating what language(s)
you can work on.
-@node Trans Intro 1, Discussions, Trans Intro 0, Translators
+@node Trans Intro 1
@section Introduction 1
@strong{ NOTE: } This documentation section is outdated and needs to be
For suggestion clarifications, additions or corrections to this
document, please e-mail to @file{coordinator@@translationproject.org}.
-@node Discussions, Organization, Trans Intro 1, Translators
+@node Discussions
@section Discussions
@strong{ NOTE: } This documentation section is outdated and needs to be
@end itemize
-@node Organization, Information Flow, Discussions, Translators
+@node Organization
@section Organization
@strong{ NOTE: } This documentation section is outdated and needs to be
* Mailing Lists:: Mailing Lists
@end menu
-@node Central Coordination, National Teams, Organization, Organization
+@node Central Coordination
@subsection Central Coordination
I also think GNU will need sooner than it thinks, that someone set up
If well done, the coordination should be useful without being an
overwhelming task, the time to put delegations in place.
-@node National Teams, Mailing Lists, Central Coordination, Organization
+@node National Teams
@subsection National Teams
I suggest we look for volunteer coordinators/editors for individual
* Organizational Ideas:: Organizational Ideas
@end menu
-@node Sub-Cultures, Organizational Ideas, National Teams, National Teams
+@node Sub-Cultures
@subsubsection Sub-Cultures
Taking French for example, there are a few sub-cultures around computers
GNU @code{gettext} become officially published. And I suspect that this
means soon!
-@node Organizational Ideas, , Sub-Cultures, National Teams
+@node Organizational Ideas
@subsubsection Organizational Ideas
I expect the next big changes after the official release. Please note
@end itemize
-@node Mailing Lists, , National Teams, Organization
+@node Mailing Lists
@subsection Mailing Lists
If we get any inquiries about GNU @code{gettext}, send them on to:
There also should be some central list to which all teams could
subscribe as they see fit, as long as each team is represented in it.
-@node Information Flow, Translating plural forms, Organization, Translators
+@node Information Flow
@section Information Flow
@strong{ NOTE: } This documentation section is outdated and needs to be
receiving acceptance yet by the GNU deciders. I'll tell you when I
have more information about this.
-@node Translating plural forms, Prioritizing messages, Information Flow, Translators
+@node Translating plural forms
@section Translating plural forms
@cindex plural forms, translating
however, @code{msgstr[0]} also applies to the numbers 21, 31, 41, etc.,
and therefore you cannot omit the placeholder.
-@node Prioritizing messages, , Translating plural forms, Translators
+@node Prioritizing messages
@section Prioritizing messages: How to determine which messages to translate first
A translator sometimes has only a limited amount of time per week to
Then she can submit @file{$domain.$lang.po} and proceed to the next domain.
-@node Maintainers, Installers, Translators, Top
+@node Maintainers
@chapter The Maintainer's View
@cindex package maintainer's view of @code{gettext}
* Release Management:: Creating a Distribution Tarball
@end menu
-@node Flat and Non-Flat, Prerequisites, Maintainers, Maintainers
+@node Flat and Non-Flat
@section Flat or Non-Flat Directory Structures
Some free software packages are distributed as @code{tar} files which unpack
described in the remaining of this chapter. Some maintainers might
use this as an opportunity to unflatten their package structure.
-@node Prerequisites, gettextize Invocation, Flat and Non-Flat, Maintainers
+@node Prerequisites
@section Prerequisite Works
@cindex converting a package to use @code{gettext}
@cindex migration from earlier versions of @code{gettext}
a maintainer, ever think there is a real problem with a team, please
never try to @emph{solve} a team's problem on your own.
-@node gettextize Invocation, Adjusting Files, Prerequisites, Maintainers
+@node gettextize Invocation
@section Invoking the @code{gettextize} Program
@include gettextize.texi
-@node Adjusting Files, autoconf macros, gettextize Invocation, Maintainers
+@node Adjusting Files
@section Files You Must Create or Alter
@cindex @code{gettext} files
* lib/gettext.h:: @file{gettext.h} in @file{lib/}
@end menu
-@node po/POTFILES.in, po/LINGUAS, Adjusting Files, Adjusting Files
+@node po/POTFILES.in
@subsection @file{POTFILES.in} in @file{po/}
@cindex @file{POTFILES.in} file
(ending in @file{.l} in the case of @code{flex}, or in @file{.y} in the
case of @code{bison}), not the generated C file.
-@node po/LINGUAS, po/Makevars, po/POTFILES.in, Adjusting Files
+@node po/LINGUAS
@subsection @file{LINGUAS} in @file{po/}
@cindex @file{LINGUAS} file
in the @file{po/} directory. You can copy them from GNU gettext's @file{po/}
directory; they are also installed by running @code{gettextize}.
-@node po/Makevars, po/Rules-*, po/LINGUAS, Adjusting Files
+@node po/Makevars
@subsection @file{Makevars} in @file{po/}
@cindex @file{Makevars} file
possible to specify @code{xgettext} options through the
@code{AM_XGETTEXT_OPTION} autoconf macro. See @ref{AM_XGETTEXT_OPTION}.
-@node po/Rules-*, configure.ac, po/Makevars, Adjusting Files
+@node po/Rules-*
@subsection Extending @file{Makefile} in @file{po/}
@cindex @file{Makefile.in.in} extensions
from those for the @file{sr} locale -- Serbian written with Cyrillic
letters. See @ref{msgfilter Invocation}.
-@node configure.ac, config.guess, po/Rules-*, Adjusting Files
+@node configure.ac
@subsection @file{configure.ac} at top level
@file{configure.ac} or @file{configure.in} - this is the source from which
invocation. This is necessary because of ordering restrictions imposed
by GNU autoconf.
-@node config.guess, mkinstalldirs, configure.ac, Adjusting Files
+@node config.guess
@subsection @file{config.guess}, @file{config.sub} at top level
If you haven't suppressed the @file{intl/} subdirectory,
AC_CONFIG_AUX_DIR([@var{subdir}])
@end example
-@node mkinstalldirs, aclocal, config.guess, Adjusting Files
+@node mkinstalldirs
@subsection @file{mkinstalldirs} at top level
@cindex @file{mkinstalldirs} file
more. You can remove it if you not also using an automake version older than
automake 1.9.
-@node aclocal, acconfig, mkinstalldirs, Adjusting Files
+@node aclocal
@subsection @file{aclocal.m4} at top level
@cindex @file{aclocal.m4} file
piece of @code{m4} code will be the same for all projects using GNU
@code{gettext}.
-@node acconfig, config.h.in, aclocal, Adjusting Files
+@node acconfig
@subsection @file{acconfig.h} at top level
@cindex @file{acconfig.h} file
them from your @file{acconfig.h} file unless your package uses them
independently from the @file{intl/} directory.
-@node config.h.in, Makefile, acconfig, Adjusting Files
+@node config.h.in
@subsection @file{config.h.in} at top level
@cindex @file{config.h.in} file
#undef ENABLE_NLS
@end example
-@node Makefile, src/Makefile, config.h.in, Adjusting Files
+@node Makefile
@subsection @file{Makefile.in} at top level
Here are a few modifications you need to make to your main, top-level
automatically generated from @file{Makefile.am}, and all needed changes
to @file{Makefile.am} are already made by running @samp{gettextize}.
-@node src/Makefile, lib/gettext.h, Makefile, Adjusting Files
+@node src/Makefile
@subsection @file{Makefile.in} in @file{src/}
Some of the modifications made in the main @file{Makefile.in} will
@end enumerate
-@node lib/gettext.h, , src/Makefile, Adjusting Files
+@node lib/gettext.h
@subsection @file{gettext.h} in @file{lib/}
@cindex @file{gettext.h} file
@cindex turning off NLS support
Do not install the @code{gettext.h} file in public locations. Every
package that needs it should contain a copy of it on its own.
-@node autoconf macros, Version Control Issues, Adjusting Files, Maintainers
+@node autoconf macros
@section Autoconf macros for use in @file{configure.ac}
@cindex autoconf macros for @code{gettext}
* AM_ICONV:: AM_ICONV in @file{iconv.m4}
@end menu
-@node AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION, autoconf macros, autoconf macros
+@node AM_GNU_GETTEXT
@subsection AM_GNU_GETTEXT in @file{gettext.m4}
@amindex AM_GNU_GETTEXT
and @code{LTLIBINTL} variables.
@end itemize
-@node AM_GNU_GETTEXT_VERSION, AM_GNU_GETTEXT_NEED, AM_GNU_GETTEXT, autoconf macros
+@node AM_GNU_GETTEXT_VERSION
@subsection AM_GNU_GETTEXT_VERSION in @file{gettext.m4}
@amindex AM_GNU_GETTEXT_VERSION
The use of this macro is optional; only the @code{autopoint} program makes
use of it (@pxref{Version Control Issues}).
-@node AM_GNU_GETTEXT_NEED, AM_GNU_GETTEXT_INTL_SUBDIR, AM_GNU_GETTEXT_VERSION, autoconf macros
+@node AM_GNU_GETTEXT_NEED
@subsection AM_GNU_GETTEXT_NEED in @file{gettext.m4}
@amindex AM_GNU_GETTEXT_NEED
The @code{AM_GNU_GETTEXT_NEED} invocations can occur before or after
the @code{AM_GNU_GETTEXT} invocation; the order doesn't matter.
-@node AM_GNU_GETTEXT_INTL_SUBDIR, AM_PO_SUBDIRS, AM_GNU_GETTEXT_NEED, autoconf macros
+@node AM_GNU_GETTEXT_INTL_SUBDIR
@subsection AM_GNU_GETTEXT_INTL_SUBDIR in @file{intldir.m4}
@amindex AM_GNU_GETTEXT_INTL_SUBDIR
The use of this macro requires GNU automake 1.10 or newer and
GNU autoconf 2.61 or newer.
-@node AM_PO_SUBDIRS, AM_XGETTEXT_OPTION, AM_GNU_GETTEXT_INTL_SUBDIR, autoconf macros
+@node AM_PO_SUBDIRS
@subsection AM_PO_SUBDIRS in @file{po.m4}
@amindex AM_PO_SUBDIRS
otherwise to @samp{no}. It also determines the right values for Makefile
variables in each @file{po/} directory.
-@node AM_XGETTEXT_OPTION, AM_ICONV, AM_PO_SUBDIRS, autoconf macros
+@node AM_XGETTEXT_OPTION
@subsection AM_XGETTEXT_OPTION in @file{po.m4}
@amindex AM_XGETTEXT_OPTION
The use of this macro is an alternative to the use of the
@samp{XGETTEXT_OPTIONS} variable in @file{po/Makevars}.
-@node AM_ICONV, , AM_XGETTEXT_OPTION, autoconf macros
+@node AM_ICONV
@subsection AM_ICONV in @file{iconv.m4}
@amindex AM_ICONV
@file{iconv.m4} is distributed with the GNU gettext package because
@file{gettext.m4} relies on it.
-@node Version Control Issues, Release Management, autoconf macros, Maintainers
+@node Version Control Issues
@section Integrating with Version Control Systems
Many projects use version control systems for distributed development
* autopoint Invocation:: Invoking the @code{autopoint} Program
@end menu
-@node Distributed Development, Files under Version Control, Version Control Issues, Version Control Issues
+@node Distributed Development
@subsection Avoiding version mismatch in distributed development
In a project development with multiple developers, there should be a
undiscovered due to this constellation.
@end itemize
-@node Files under Version Control, Translations under Version Control, Distributed Development, Version Control Issues
+@node Files under Version Control
@subsection Files to put under version control
There are basically three ways to deal with generated files in the
use the CVS will henceforth need to have GNU @code{gettext} 0.12.1 or newer
installed.
-@node Translations under Version Control, autopoint Invocation, Files under Version Control, Version Control Issues
+@node Translations under Version Control
@subsection Put PO Files under Version Control
Since translations are valuable assets as well as the source code, it
@end itemize
-@node autopoint Invocation, , Translations under Version Control, Version Control Issues
+@node autopoint Invocation
@subsection Invoking the @code{autopoint} Program
@include autopoint.texi
-@node Release Management, , Version Control Issues, Maintainers
+@node Release Management
@section Creating a Distribution Tarball
@cindex release
$ make distclean
@end example
-@node Installers, Programming Languages, Maintainers, Top
+@node Installers
@chapter The Installer's and Distributor's View
@cindex package installer's view of @code{gettext}
@cindex package distributor's view of @code{gettext}
@code{LINGUAS} should then contain a space separated list of two-letter
codes, stating which languages are allowed.
-@node Programming Languages, Data Formats, Installers, Top
+@node Programming Languages
@chapter Other Programming Languages
While the presentation of @code{gettext} focuses mostly on C and
* List of Programming Languages:: Individual Programming Languages
@end menu
-@node Language Implementors, Programmers for other Languages, Programming Languages, Programming Languages
+@node Language Implementors
@section The Language Implementor's View
@cindex programming languages
@cindex scripting languages
and plural handling).
@end itemize
-@node Programmers for other Languages, Translators for other Languages, Language Implementors, Programming Languages
+@node Programmers for other Languages
@section The Programmer's View
For the programmer, the general procedure is the same as for the C
@code{setlocale} is not needed because it is already performed by the
underlying language runtime.
-@node Translators for other Languages, Maintainers for other Languages, Programmers for other Languages, Programming Languages
+@node Translators for other Languages
@section The Translator's View
The translator works exactly as in the C language case. The only
* javascript-format:: JavaScript Format Strings
@end menu
-@node c-format, objc-format, Translators for other Languages, Translators for other Languages
+@node c-format
@subsection C Format Strings
C format strings are described in POSIX (IEEE P1003.1 2001), section
@var{msgid} string would lead to undefined behaviour on platforms without
glibc when NLS is disabled.)
-@node objc-format, sh-format, c-format, Translators for other Languages
+@node objc-format
@subsection Objective C Format Strings
Objective C format strings are like C format strings. They support an
additional format directive: "%@@", which when executed consumes an argument
of type @code{Object *}.
-@node sh-format, python-format, objc-format, Translators for other Languages
+@node sh-format
@subsection Shell Format Strings
Shell format strings, as supported by GNU gettext and the @samp{envsubst}
ASCII characters, not start with a digit and be nonempty; otherwise such
a variable reference is ignored.
-@node python-format, lisp-format, sh-format, Translators for other Languages
+@node python-format
@subsection Python Format Strings
There are two kinds of format strings in Python: those acceptable to
Python brace format strings are described in @w{PEP 3101 -- Advanced
String Formatting}, @uref{https://www.python.org/dev/peps/pep-3101/}.
-@node lisp-format, elisp-format, python-format, Translators for other Languages
+@node lisp-format
@subsection Lisp Format Strings
Lisp format strings are described in the Common Lisp HyperSpec,
chapter 22.3 @w{Formatted Output},
@uref{http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_22-3.html}.
-@node elisp-format, librep-format, lisp-format, Translators for other Languages
+@node elisp-format
@subsection Emacs Lisp Format Strings
Emacs Lisp format strings are documented in the Emacs Lisp reference,
Note that as of version 21, XEmacs supports numbered argument specifications
in format strings while FSF Emacs doesn't.
-@node librep-format, scheme-format, elisp-format, Translators for other Languages
+@node librep-format
@subsection librep Format Strings
librep format strings are documented in the librep manual, section
@url{http://librep.sourceforge.net/librep-manual.html#Formatted%20Output},
@url{http://www.gwinnup.org/research/docs/librep.html#SEC122}.
-@node scheme-format, smalltalk-format, librep-format, Translators for other Languages
+@node scheme-format
@subsection Scheme Format Strings
Scheme format strings are documented in the SLIB manual, section
@w{Format Specification}.
-@node smalltalk-format, java-format, scheme-format, Translators for other Languages
+@node smalltalk-format
@subsection Smalltalk Format Strings
Smalltalk format strings are described in the GNU Smalltalk documentation,
In summary, a directive starts with @samp{%} and is followed by @samp{%}
or a nonzero digit (@samp{1} to @samp{9}).
-@node java-format, csharp-format, smalltalk-format, Translators for other Languages
+@node java-format
@subsection Java Format Strings
Java format strings are described in the JDK documentation for class
See also the ICU documentation
@uref{http://oss.software.ibm.com/icu/apiref/classMessageFormat.html}.
-@node csharp-format, awk-format, java-format, Translators for other Languages
+@node csharp-format
@subsection C# Format Strings
C# format strings are described in the .NET documentation for class
@code{System.String} and in
@uref{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpConFormattingOverview.asp}.
-@node awk-format, object-pascal-format, csharp-format, Translators for other Languages
+@node awk-format
@subsection awk Format Strings
awk format strings are described in the gawk documentation, section
@w{Printf},
@uref{https://www.gnu.org/manual/gawk/html_node/Printf.html#Printf}.
-@node object-pascal-format, ycp-format, awk-format, Translators for other Languages
+@node object-pascal-format
@subsection Object Pascal Format Strings
Object Pascal format strings are described in the documentation of the
Free Pascal runtime library, section Format,
@uref{https://www.freepascal.org/docs-html/rtl/sysutils/format.html}.
-@node ycp-format, tcl-format, object-pascal-format, Translators for other Languages
+@node ycp-format
@subsection YCP Format Strings
YCP sformat strings are described in the libycp documentation
In summary, a directive starts with @samp{%} and is followed by @samp{%}
or a nonzero digit (@samp{1} to @samp{9}).
-@node tcl-format, perl-format, ycp-format, Translators for other Languages
+@node tcl-format
@subsection Tcl Format Strings
Tcl format strings are described in the @file{format.n} manual page,
@uref{http://www.scriptics.com/man/tcl8.3/TclCmd/format.htm}.
-@node perl-format, php-format, tcl-format, Translators for other Languages
+@node perl-format
@subsection Perl Format Strings
There are two kinds format strings in Perl: those acceptable to the
braces (@samp{@{} and @samp{@}}). The placeholder must have the syntax
of simple identifiers.
-@node php-format, gcc-internal-format, perl-format, Translators for other Languages
+@node php-format
@subsection PHP Format Strings
PHP format strings are described in the documentation of the PHP function
@code{sprintf}, in @file{phpdoc/manual/function.sprintf.html} or
@uref{http://www.php.net/manual/en/function.sprintf.php}.
-@node gcc-internal-format, gfc-internal-format, php-format, Translators for other Languages
+@node gcc-internal-format
@subsection GCC internal Format Strings
These format strings are used inside the GCC sources. In such a format
@samp{P} denotes a function parameter, @samp{Q} denotes an assignment
operator, @samp{V} denotes a const/volatile qualifier.
-@node gfc-internal-format, qt-format, gcc-internal-format, Translators for other Languages
+@node gfc-internal-format
@subsection GFC internal Format Strings
These format strings are used inside the GNU Fortran Compiler sources,
denote an integer, @samp{u} denotes an unsigned integer. @samp{i},
@samp{d}, and @samp{u} may be preceded by a size specifier @samp{l}.
-@node qt-format, qt-plural-format, gfc-internal-format, Translators for other Languages
+@node qt-format
@subsection Qt Format Strings
Qt format strings are described in the documentation of the QString class
In summary, a directive consists of a @samp{%} followed by a digit. The same
directive cannot occur more than once in a format string.
-@node qt-plural-format, kde-format, qt-format, Translators for other Languages
+@node qt-plural-format
@subsection Qt Format Strings
Qt format strings are described in the documentation of the QObject::tr method
@uref{file:/usr/lib/qt-4.3.0/doc/html/qobject.html}.
In summary, the only allowed directive is @samp{%n}.
-@node kde-format, kde-kuit-format, qt-plural-format, Translators for other Languages
+@node kde-format
@subsection KDE Format Strings
KDE 4 format strings are defined as follows:
If a @samp{%n} occurs in a format strings, all of @samp{%1}, ..., @samp{%(n-1)}
must occur as well, except possibly one of them.
-@node kde-kuit-format, boost-format, kde-format, Translators for other Languages
+@node kde-kuit-format
@subsection KUIT Format Strings
KUIT (KDE User Interface Text) is compatible with KDE 4 format strings,
KUIT format strings are described in
@uref{https://api.kde.org/frameworks/ki18n/html/prg_guide.html#kuit_markup}.
-@node boost-format, lua-format, kde-kuit-format, Translators for other Languages
+@node boost-format
@subsection Boost Format Strings
Boost format strings are described in the documentation of the
@samp{%|1$+5d|} or @samp{%|1$+5|}, or consists of just an argument number
between percent signs, such as @samp{%1%}.
-@node lua-format, javascript-format, boost-format, Translators for other Languages
+@node lua-format
@subsection Lua Format Strings
Lua format strings are described in the Lua reference manual, section @w{String Manipulation},
@uref{https://www.lua.org/manual/5.1/manual.html#pdf-string.format}.
-@node javascript-format, , lua-format, Translators for other Languages
+@node javascript-format
@subsection JavaScript Format Strings
Although JavaScript specification itself does not define any format
object.
-@node Maintainers for other Languages, List of Programming Languages, Translators for other Languages, Programming Languages
+@node Maintainers for other Languages
@section The Maintainer's View
For the maintainer, the general procedure differs from the C language
that language, and to combine the resulting files using @code{msgcat}.
@end itemize
-@node List of Programming Languages, , Maintainers for other Languages, Programming Languages
+@node List of Programming Languages
@section Individual Programming Languages
@c Here is a list of programming languages, as used for Free Software projects
* Vala:: Vala
@end menu
-@node C, sh, List of Programming Languages, List of Programming Languages
+@node C
@subsection C, C++, Objective C
@cindex C and C-like languages
@code{hello-c++-kde}, @code{hello-c++-gnome}, @code{hello-c++-wxwidgets},
@code{hello-objc}, @code{hello-objc-gnustep}, @code{hello-objc-gnome}.
-@node sh, bash, C, List of Programming Languages
+@node sh
@subsection sh - Shell Script
@cindex shell scripts
* eval_npgettext Invocation:: Invoking the @code{eval_npgettext} function
@end menu
-@node Preparing Shell Scripts, gettext.sh, sh, sh
+@node Preparing Shell Scripts
@subsubsection Preparing Shell Scripts for Internationalization
@cindex preparing shell scripts for translation
@end smallexample
@end enumerate
-@node gettext.sh, gettext Invocation, Preparing Shell Scripts, sh
+@node gettext.sh
@subsubsection Contents of @code{gettext.sh}
@code{gettext.sh}, contained in the run-time package of GNU gettext, provides
See @ref{eval_npgettext Invocation}.
@end itemize
-@node gettext Invocation, ngettext Invocation, gettext.sh, sh
+@node gettext Invocation
@subsubsection Invoking the @code{gettext} program
@include rt-gettext.texi
@code{gettext} invocation, where no options are present and the
@var{textdomain} is implicit, from the environment.
-@node ngettext Invocation, envsubst Invocation, gettext Invocation, sh
+@node ngettext Invocation
@subsubsection Invoking the @code{ngettext} program
@include rt-ngettext.texi
@code{ngettext} invocation, where no options are present and the
@var{textdomain} is implicit, from the environment.
-@node envsubst Invocation, eval_gettext Invocation, ngettext Invocation, sh
+@node envsubst Invocation
@subsubsection Invoking the @code{envsubst} program
@include rt-envsubst.texi
-@node eval_gettext Invocation, eval_ngettext Invocation, envsubst Invocation, sh
+@node eval_gettext Invocation
@subsubsection Invoking the @code{eval_gettext} function
@cindex @code{eval_gettext} function, usage
performing dollar-substitution on the result. Note that only shell variables
mentioned in @var{msgid} will be dollar-substituted in the result.
-@node eval_ngettext Invocation, eval_pgettext Invocation, eval_gettext Invocation, sh
+@node eval_ngettext Invocation
@subsubsection Invoking the @code{eval_ngettext} function
@cindex @code{eval_ngettext} function, usage
on the result. Note that only shell variables mentioned in @var{msgid} or
@var{msgid-plural} will be dollar-substituted in the result.
-@node eval_pgettext Invocation, eval_npgettext Invocation, eval_ngettext Invocation, sh
+@node eval_pgettext Invocation
@subsubsection Invoking the @code{eval_pgettext} function
@cindex @code{eval_pgettext} function, usage
dollar-substitution on the result. Note that only shell variables mentioned
in @var{msgid} will be dollar-substituted in the result.
-@node eval_npgettext Invocation, , eval_pgettext Invocation, sh
+@node eval_npgettext Invocation
@subsubsection Invoking the @code{eval_npgettext} function
@cindex @code{eval_npgettext} function, usage
that only shell variables mentioned in @var{msgid} or @var{msgid-plural}
will be dollar-substituted in the result.
-@node bash, Python, sh, List of Programming Languages
+@node bash
@subsection bash - Bourne-Again Shell Script
@cindex bash
internationalization support; this is normally not the case on systems
that don't have the @code{gettext()} function in libc.
-@node Python, Common Lisp, bash, List of Programming Languages
+@node Python
@subsection Python
@cindex Python
verifies that the format string uses all supplied arguments.)
@end itemize
-@node Common Lisp, clisp C, Python, List of Programming Languages
+@node Common Lisp
@subsection GNU clisp - Common Lisp
@cindex Common Lisp
@cindex Lisp
An example is available in the @file{examples} directory: @code{hello-clisp}.
-@node clisp C, Emacs Lisp, Common Lisp, List of Programming Languages
+@node clisp C
@subsection GNU clisp C sources
@cindex clisp C sources
---
@end table
-@node Emacs Lisp, librep, clisp C, List of Programming Languages
+@node Emacs Lisp
@subsection Emacs Lisp
@cindex Emacs Lisp
---
@end table
-@node librep, Scheme, Emacs Lisp, List of Programming Languages
+@node librep
@subsection librep
@cindex @code{librep} Lisp
An example is available in the @file{examples} directory: @code{hello-librep}.
-@node Scheme, Smalltalk, librep, List of Programming Languages
+@node Scheme
@subsection GNU guile - Scheme
@cindex Scheme
@cindex guile
An example is available in the @file{examples} directory: @code{hello-guile}.
-@node Smalltalk, Java, Scheme, List of Programming Languages
+@node Smalltalk
@subsection GNU Smalltalk
@cindex Smalltalk
An example is available in the @file{examples} directory:
@code{hello-smalltalk}.
-@node Java, C#, Smalltalk, List of Programming Languages
+@node Java
@subsection Java
@cindex Java
copying two lines of codes into every class is more acceptable in your project
than a class with a single-letter name.
-@node C#, gawk, Java, List of Programming Languages
+@node C#
@subsection C#
@cindex C#
of codes into every class is more acceptable in your project than a class
with a single-letter name.
-@node gawk, Pascal, C#, List of Programming Languages
+@node gawk
@subsection GNU awk
@cindex awk
@cindex gawk
An example is available in the @file{examples} directory: @code{hello-gawk}.
-@node Pascal, wxWidgets, gawk, List of Programming Languages
+@node Pascal
@subsection Pascal - Free Pascal Compiler
@cindex Pascal
@cindex Free Pascal
An example is available in the @file{examples} directory: @code{hello-pascal}.
-@node wxWidgets, YCP, Pascal, List of Programming Languages
+@node wxWidgets
@subsection wxWidgets library
@cindex @code{wxWidgets} library
yes
@end table
-@node YCP, Tcl, wxWidgets, List of Programming Languages
+@node YCP
@subsection YCP - YaST2 scripting language
@cindex YCP
@cindex YaST2 scripting language
An example is available in the @file{examples} directory: @code{hello-ycp}.
-@node Tcl, Perl, YCP, List of Programming Languages
+@node Tcl
@subsection Tcl - Tk's scripting language
@cindex Tcl
@cindex Tk's scripting language
@code{msgcat::mc} function implicitly calls @code{format} when more than one
argument is given.
-@node Perl, PHP, Tcl, List of Programming Languages
+@node Perl
@subsection Perl
@cindex Perl
* Perl Pitfalls:: Bugs, Pitfalls, and Things That Do Not Work
@end menu
-@node General Problems, Default Keywords, Perl, Perl
+@node General Problems
@subsubsection General Problems Parsing Perl Code
It is often heard that only Perl can parse Perl. This is not true.
In fact the Perl parser itself has similar problems and warns you
about such constructs.
-@node Default Keywords, Special Keywords, General Problems, Perl
+@node Default Keywords
@subsubsection Which keywords will xgettext look for?
@cindex Perl default keywords
@end itemize
-@node Special Keywords, Quote-like Expressions, Default Keywords, Perl
+@node Special Keywords
@subsubsection How to Extract Hash Keys
@cindex Perl special keywords for hash-lookups
of underscores, ASCII letters or digits. Other Unicode characters
are @emph{not} allowed, regardless of the @code{use utf8} pragma.
-@node Quote-like Expressions, Interpolation I, Special Keywords, Perl
+@node Quote-like Expressions
@subsubsection What are Strings And Quote-like Expressions?
@cindex Perl quote-like expressions
@end itemize
-@node Interpolation I, Interpolation II, Quote-like Expressions, Perl
+@node Interpolation I
@subsubsection Invalid Uses Of String Interpolation
@cindex Perl invalid string interpolation
translation can be safely performed at compile time you can just as
well write what you mean.
-@node Interpolation II, Parentheses, Interpolation I, Perl
+@node Interpolation II
@subsubsection Valid Uses Of String Interpolation
@cindex Perl valid string interpolation
s/$gettext@{"U. S. A."@}/$gettext@{"U. S. A."@} $gettext@{"(dial +0)"@}/g;
@end example
-@node Parentheses, Long Lines, Interpolation II, Perl
+@node Parentheses
@subsubsection When To Use Parentheses
@cindex Perl parentheses
@end group
@end example
-@node Long Lines, Perl Pitfalls, Parentheses, Perl
+@node Long Lines
@subsubsection How To Grok with Long Lines
@cindex Perl long lines
translate into newline characters that will consequently show up in
the resulting POT file.
-@node Perl Pitfalls, , Long Lines, Perl
+@node Perl Pitfalls
@subsubsection Bugs, Pitfalls, And Things That Do Not Work
@cindex Perl pitfalls
get executed. Most of the time you will happily get along with
@code{printf()} for this special case.
-@node PHP, Pike, Perl, List of Programming Languages
+@node PHP
@subsection PHP Hypertext Preprocessor
@cindex PHP
An example is available in the @file{examples} directory: @code{hello-php}.
-@node Pike, GCC-source, PHP, List of Programming Languages
+@node Pike
@subsection Pike
@cindex Pike
---
@end table
-@node GCC-source, Lua, Pike, List of Programming Languages
+@node GCC-source
@subsection GNU Compiler Collection sources
@cindex GCC-source
yes
@end table
-@node Lua, JavaScript, GCC-source, List of Programming Languages
+@node Lua
@subsection Lua
@table @asis
---
@end table
-@node JavaScript, Vala, Lua, List of Programming Languages
+@node JavaScript
@subsection JavaScript
@table @asis
---
@end table
-@node Vala, , JavaScript, List of Programming Languages
+@node Vala
@subsection Vala
@table @asis
@end ignore
-@node Data Formats, Conclusion, Programming Languages, Top
+@node Data Formats
@chapter Other Data Formats
While the GNU gettext tools deal mainly with POT and PO files, they can
* Localized Data:: Localized Data Formats
@end menu
-@node Internationalizable Data, Localized Data, Data Formats, Data Formats
+@node Internationalizable Data
@section Internationalizable Data Formats
Here is a list of other data formats which can be internationalized
* Preparing ITS Rules:: Preparing Rules for XML Internationalization
@end menu
-@node POT, RST, Internationalizable Data, Internationalizable Data
+@node POT
@subsection POT - Portable Object Template
@table @asis
@code{xgettext}
@end table
-@node RST, Glade, POT, Internationalizable Data
+@node RST
@subsection Resource String Table
@cindex RST
@cindex RSJ
@code{xgettext}, @code{rstconv}
@end table
-@node Glade, GSettings, RST, Internationalizable Data
+@node Glade
@subsection Glade - GNOME user interface description
@table @asis
@code{xgettext}, @code{libglade-xgettext}, @code{xml-i18n-extract}, @code{intltool-extract}
@end table
-@node GSettings, AppData, Glade, Internationalizable Data
+@node GSettings
@subsection GSettings - GNOME user configuration schema
@table @asis
@code{xgettext}, @code{intltool-extract}
@end table
-@node AppData, Preparing ITS Rules, GSettings, Internationalizable Data
+@node AppData
@subsection AppData - freedesktop.org application description
This file format is specified in
@code{xgettext}, @code{intltool-extract}, @code{itstool}
@end table
-@node Preparing ITS Rules, , AppData, Internationalizable Data
+@node Preparing ITS Rules
@subsection Preparing Rules for XML Internationalization
@cindex preparing rules for XML translation
@end ignore
-@node Localized Data, , Internationalizable Data, Data Formats
+@node Localized Data
@section Localized Data Formats
Here is a list of file formats that contain localized data and that the
* XML:: XML files
@end menu
-@node Editable Message Catalogs, Compiled Message Catalogs, Localized Data, Localized Data
+@node Editable Message Catalogs
@subsection Editable Message Catalogs
These file formats can be used with all of the @code{msg*} tools and with
* GNUstep .strings:: NeXTstep/GNUstep .strings
@end menu
-@node PO, Java .properties, Editable Message Catalogs, Editable Message Catalogs
+@node PO
@subsubsection PO - Portable Object
@table @asis
@code{po}
@end table
-@node Java .properties, GNUstep .strings, PO, Editable Message Catalogs
+@node Java .properties
@subsubsection Java .properties
@table @asis
@code{properties}
@end table
-@node GNUstep .strings, , Java .properties, Editable Message Catalogs
+@node GNUstep .strings
@subsubsection NeXTstep/GNUstep .strings
@table @asis
@code{strings}
@end table
-@node Compiled Message Catalogs, Desktop Entry, Editable Message Catalogs, Localized Data
+@node Compiled Message Catalogs
@subsection Compiled Message Catalogs
These file formats can be created through @code{msgfmt} and converted back
* Qt message catalog:: Qt message catalog
@end menu
-@node MO, Java ResourceBundle, Compiled Message Catalogs, Compiled Message Catalogs
+@node MO
@subsubsection MO - Machine Object
@table @asis
See section @ref{MO Files} for details.
-@node Java ResourceBundle, C# Satellite Assembly, MO, Compiled Message Catalogs
+@node Java ResourceBundle
@subsubsection Java ResourceBundle
@table @asis
For more information, see the section @ref{Java} and the examples
@code{hello-java}, @code{hello-java-awt}, @code{hello-java-swing}.
-@node C# Satellite Assembly, C# Resource, Java ResourceBundle, Compiled Message Catalogs
+@node C# Satellite Assembly
@subsubsection C# Satellite Assembly
@table @asis
For more information, see the section @ref{C#}.
-@node C# Resource, Tcl message catalog, C# Satellite Assembly, Compiled Message Catalogs
+@node C# Resource
@subsubsection C# Resource
@table @asis
For more information, see the section @ref{C#}.
-@node Tcl message catalog, Qt message catalog, C# Resource, Compiled Message Catalogs
+@node Tcl message catalog
@subsubsection Tcl message catalog
@table @asis
For more information, see the section @ref{Tcl} and the examples
@code{hello-tcl}, @code{hello-tcl-tk}.
-@node Qt message catalog, , Tcl message catalog, Compiled Message Catalogs
+@node Qt message catalog
@subsubsection Qt message catalog
@table @asis
For more information, see the examples @code{hello-c++-qt} and
@code{hello-c++-kde}.
-@node Desktop Entry, XML, Compiled Message Catalogs, Localized Data
+@node Desktop Entry
@subsection Desktop Entry files
The programmer produces a desktop entry file template with only the
For more information, see the example @code{hello-c-gnome3}.
-@node XML, , Desktop Entry, Localized Data
+@node XML
@subsection XML files
See the section @ref{Preparing ITS Rules} and
@ref{msgfmt Invocation}, subsection ``XML mode operations''.
-@node Conclusion, Language Codes, Data Formats, Top
+@node Conclusion
@chapter Concluding Remarks
We would like to conclude this GNU @code{gettext} manual by presenting
* References:: Related Readings
@end menu
-@node History, References, Conclusion, Conclusion
+@node History
@section History of GNU @code{gettext}
@cindex history of GNU @code{gettext}
support for UTF-8 and CJK locales, and wrote a few new tools for
manipulating PO files.
-@node References, , History, Conclusion
+@node References
@section Related Readings
@cindex related reading
@cindex bibliography
@noindent
together with French translations of many Linux-related documents.
-@node Language Codes, Country Codes, Conclusion, Top
+@node Language Codes
@appendix Language Codes
@cindex language codes
@cindex ISO 639
* Rare Language Codes:: Three-letter ISO 639 language codes
@end menu
-@node Usual Language Codes, Rare Language Codes, Language Codes, Language Codes
+@node Usual Language Codes
@appendixsec Usual Language Codes
For the commonly used languages, the @w{ISO 639-1} standard defines two-letter
@include iso-639.texi
@end table
-@node Rare Language Codes, , Usual Language Codes, Language Codes
+@node Rare Language Codes
@appendixsec Rare Language Codes
For rarely used languages, the @w{ISO 639-2} standard defines three-letter
@include iso-639-2.texi
@end table
-@node Country Codes, Licenses, Language Codes, Top
+@node Country Codes
@appendix Country Codes
@cindex country codes
@cindex ISO 3166
@include iso-3166.texi
@end table
-@node Licenses, Program Index, Country Codes, Top
+@node Licenses
@appendix Licenses
@cindex Licenses
@end menu
@page
-@node GNU GPL, GNU LGPL, Licenses, Licenses
+@node GNU GPL
@appendixsec GNU GENERAL PUBLIC LICENSE
@cindex GPL, GNU General Public License
@cindex License, GNU GPL
@include gpl.texi
@page
-@node GNU LGPL, GNU FDL, GNU GPL, Licenses
+@node GNU LGPL
@appendixsec GNU LESSER GENERAL PUBLIC LICENSE
@cindex LGPL, GNU Lesser General Public License
@cindex License, GNU LGPL
@include lgpl.texi
@page
-@node GNU FDL, , GNU LGPL, Licenses
+@node GNU FDL
@appendixsec GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@cindex License, GNU FDL
@include fdl.texi
-@node Program Index, Option Index, Licenses, Top
+@node Program Index
@unnumbered Program Index
@printindex pg
-@node Option Index, Variable Index, Program Index, Top
+@node Option Index
@unnumbered Option Index
@printindex op
-@node Variable Index, PO Mode Index, Option Index, Top
+@node Variable Index
@unnumbered Variable Index
@printindex vr
-@node PO Mode Index, Autoconf Macro Index, Variable Index, Top
+@node PO Mode Index
@unnumbered PO Mode Index
@printindex em
-@node Autoconf Macro Index, Index, PO Mode Index, Top
+@node Autoconf Macro Index
@unnumbered Autoconf Macro Index
@printindex am
-@node Index, , Autoconf Macro Index, Top
+@node Index
@unnumbered General Index
@printindex cp