\1f
Indirect:
gettext.info-1: 1411
-gettext.info-2: 48952
-gettext.info-3: 98371
-gettext.info-4: 147112
-gettext.info-5: 195688
+gettext.info-2: 49085
+gettext.info-3: 98511
+gettext.info-4: 147276
+gettext.info-5: 196307
\1f
Tag Table:
(Indirect)
Node: Top\7f1411
-Node: Introduction\7f6944
-Node: Why\7f8800
-Ref: Why-Footnote-1\7f11890
-Node: Concepts\7f12046
-Node: Aspects\7f15459
-Node: Files\7f21208
-Node: Overview\7f23150
-Node: Basics\7f34076
-Node: Installation\7f34906
-Node: PO Files\7f36873
-Ref: PO Files-Footnote-1\7f43885
-Node: Main PO Commands\7f44012
-Node: Entry Positioning\7f48952
-Node: Normalizing\7f54203
-Node: Sources\7f58655
-Node: Triggering\7f59926
-Node: Mark Keywords\7f62941
-Node: Marking\7f66491
-Node: c-format\7f74132
-Node: Special cases\7f77882
-Node: Template\7f80744
-Node: xgettext Invocation\7f81096
-Node: Creating\7f84900
-Node: Updating\7f91212
-Node: msgmerge Invocation\7f91965
-Node: Translated Entries\7f92139
-Node: Fuzzy Entries\7f93430
-Node: Untranslated Entries\7f96532
-Node: Obsolete Entries\7f98371
-Node: Modifying Translations\7f101503
-Node: Modifying Comments\7f109321
-Node: Subedit\7f113628
-Node: C Sources Context\7f117413
-Node: Auxiliary\7f122380
-Node: Compendium\7f125479
-Node: Binaries\7f126175
-Node: msgfmt Invocation\7f126439
-Node: MO Files\7f129065
-Node: Users\7f137151
-Node: Matrix\7f138632
-Node: Installers\7f139835
-Node: End Users\7f141005
-Node: Programmers\7f141634
-Node: catgets\7f142808
-Node: Interface to catgets\7f144213
-Node: Problems with catgets\7f146214
-Node: gettext\7f147112
-Node: Interface to gettext\7f148570
-Node: Ambiguities\7f150912
-Node: Locating Catalogs\7f153469
-Ref: Locating Catalogs-Footnote-1\7f154616
-Ref: Locating Catalogs-Footnote-2\7f154841
-Node: Charset conversion\7f154990
-Node: Plural forms\7f157432
-Ref: Plural forms-Footnote-1\7f167461
-Node: GUI program problems\7f167553
-Node: Optimized gettext\7f172656
-Node: Comparison\7f173989
-Node: Using libintl.a\7f178261
-Node: gettext grok\7f179038
-Node: Temp Programmers\7f181670
-Node: Temp Implementations\7f182110
-Node: Temp catgets\7f183476
-Node: Temp WSI\7f185163
-Node: Temp Notes\7f187151
-Node: Translators\7f187640
-Node: Trans Intro 0\7f188019
-Node: Trans Intro 1\7f190668
-Node: Discussions\7f192532
-Node: Organization\7f195688
-Node: Central Coordination\7f197669
-Node: National Teams\7f198797
-Node: Sub-Cultures\7f201309
-Node: Organizational Ideas\7f202228
-Node: Mailing Lists\7f203231
-Node: Information Flow\7f205034
-Node: Maintainers\7f207167
-Node: Flat and Non-Flat\7f208926
-Node: Prerequisites\7f210409
-Node: gettextize Invocation\7f214518
-Node: Adjusting Files\7f218090
-Node: po/POTFILES.in\7f219313
-Node: configure.in\7f220252
-Node: aclocal\7f222378
-Node: acconfig\7f223557
-Node: Makefile\7f224155
-Node: src/Makefile\7f226343
-Node: Conclusion\7f228740
-Node: History\7f229230
-Node: References\7f232690
-Node: Language Codes\7f234245
+Node: Introduction\7f7072
+Node: Why\7f8928
+Ref: Why-Footnote-1\7f12035
+Node: Concepts\7f12191
+Node: Aspects\7f15604
+Node: Files\7f21353
+Node: Overview\7f23295
+Node: Basics\7f34216
+Node: Installation\7f35046
+Node: PO Files\7f37016
+Ref: PO Files-Footnote-1\7f44018
+Node: Main PO Commands\7f44145
+Node: Entry Positioning\7f49085
+Node: Normalizing\7f54339
+Node: Sources\7f58792
+Node: Triggering\7f60062
+Node: Mark Keywords\7f63078
+Node: Marking\7f66626
+Node: c-format\7f74270
+Node: Special cases\7f78026
+Node: Template\7f80888
+Node: xgettext Invocation\7f81240
+Node: Creating\7f85050
+Node: Updating\7f91362
+Node: msgmerge Invocation\7f92115
+Node: Translated Entries\7f92289
+Node: Fuzzy Entries\7f93580
+Node: Untranslated Entries\7f96675
+Node: Obsolete Entries\7f98511
+Node: Modifying Translations\7f101643
+Node: Modifying Comments\7f109464
+Node: Subedit\7f113772
+Node: C Sources Context\7f117548
+Node: Auxiliary\7f122514
+Node: Compendium\7f125613
+Node: Binaries\7f126309
+Node: msgfmt Invocation\7f126573
+Node: MO Files\7f129201
+Node: Users\7f137290
+Node: Matrix\7f138773
+Node: Installers\7f139977
+Node: End Users\7f141147
+Node: Programmers\7f141796
+Node: catgets\7f142968
+Node: Interface to catgets\7f144372
+Node: Problems with catgets\7f146376
+Node: gettext\7f147276
+Node: Interface to gettext\7f148734
+Node: Ambiguities\7f151075
+Node: Locating Catalogs\7f153768
+Ref: Locating Catalogs-Footnote-1\7f154915
+Ref: Locating Catalogs-Footnote-2\7f155140
+Node: Charset conversion\7f155289
+Node: Plural forms\7f157731
+Ref: Plural forms-Footnote-1\7f168079
+Node: GUI program problems\7f168171
+Node: Optimized gettext\7f173275
+Node: Comparison\7f174608
+Node: Using libintl.a\7f178880
+Node: gettext grok\7f179657
+Node: Temp Programmers\7f182289
+Node: Temp Implementations\7f182729
+Node: Temp catgets\7f184095
+Node: Temp WSI\7f185782
+Node: Temp Notes\7f187770
+Node: Translators\7f188259
+Node: Trans Intro 0\7f188638
+Node: Trans Intro 1\7f191287
+Node: Discussions\7f193151
+Node: Organization\7f196307
+Node: Central Coordination\7f198288
+Node: National Teams\7f199416
+Node: Sub-Cultures\7f201928
+Node: Organizational Ideas\7f202847
+Node: Mailing Lists\7f203850
+Node: Information Flow\7f205653
+Node: Maintainers\7f207786
+Node: Flat and Non-Flat\7f209545
+Node: Prerequisites\7f211028
+Node: gettextize Invocation\7f215150
+Node: Adjusting Files\7f218722
+Node: po/POTFILES.in\7f220019
+Node: configure.in\7f220963
+Node: config.guess\7f223094
+Node: aclocal\7f224153
+Node: acconfig\7f225271
+Node: Makefile\7f225754
+Node: src/Makefile\7f228202
+Node: Conclusion\7f231104
+Node: History\7f231594
+Node: References\7f235054
+Node: Language Codes\7f236609
+Node: Country Codes\7f240512
\1f
End Tag Table
* Conclusion:: Concluding Remarks
* Language Codes:: ISO 639 language codes
+* Country Codes:: ISO 3166 country codes
--- The Detailed Node Listing ---
Preparing Program Sources
* Triggering:: Triggering `gettext' Operations
-* Mark Keywords:: How Marks Appears in Sources
+* Mark Keywords:: How Marks Appear in Sources
* Marking:: Marking Translatable Strings
* c-format:: Telling something about the following string
* Special cases:: Special Cases of Translatable Strings
* po/POTFILES.in:: `POTFILES.in' in `po/'
* configure.in:: `configure.in' at top level
+* config.guess:: `config.guess', `config.sub' at top level
* aclocal:: `aclocal.m4' at top level
* acconfig:: `acconfig.h' at top level
* Makefile:: `Makefile.in' at top level
set of tools and documentation. Specifically, the GNU `gettext'
utilities are a set of tools that provides a framework within which
other free packages may produce multi-lingual messages. These tools
-include a set of conventions about how programs should be written to
-support message catalogs, a directory and file naming organization for
-the message catalogs themselves, a runtime library supporting the
-retrieval of translated messages, and a few stand-alone programs to
-massage in various ways the sets of translatable strings, or already
-translated strings. A special mode for Emacs(1) also helps ease
-interested parties into preparing these sets, or bringing them up to
-date.
+include
+
+ * A set of conventions about how programs should be written to
+ support message catalogs.
+
+ * A directory and file naming organization for the message catalogs
+ themselves.
+
+ * A runtime library supporting the retrieval of translated messages.
+
+ * A few stand-alone programs to massage in various ways the sets of
+ translatable strings, or already translated strings.
+
+ * A special mode for Emacs(1) which helps preparing these sets and
+ bringing them up to date.
GNU `gettext' is designed to minimize the impact of
internationalization on program sources, keeping this impact as small
information about all this.
For newly written software the strings of course can and should be
-marked while writing the it. The `gettext' approach makes this very
-easy. Simply put the following lines at the beginning of each file or
-in a central header file:
+marked while writing it. The `gettext' approach makes this very easy.
+Simply put the following lines at the beginning of each file or in a
+central header file:
#define _(String) (String)
#define N_(String) (String)
installation, you might also want to make the PO mode available to your
Emacs users.
- During the installation of the PO mode, you might want modify your
+ During the installation of the PO mode, you might want to modify your
file `.emacs', once and for all, so it contains a few lines looking
like:
maintained automatically by GNU `gettext' tools. All comments, of
either kind, are optional.
- After white space and comments, entries show two strings, giving
+ After white space and comments, entries show two strings, namely
first the untranslated string as it appears in the original program
sources, and then, the translation of this string. The original string
is introduced by the keyword `msgid', and the translation, by `msgstr'.
The two strings, untranslated and translated, are quoted in various
ways in the PO file, using `"' delimiters and `\' escapes, but the
translator does not really have to pay attention to the precise quoting
-format, as PO mode fully intend to take care of quoting for her.
+format, as PO mode fully takes care of quoting for her.
The `msgid' strings, as well as automatic comments, are produced and
managed by other GNU `gettext' tools, and PO mode does not provide
The comment lines beginning with `#,' are special because they are
not completely ignored by the programs as comments generally are. The
comma separated list of FLAGs is used by the `msgfmt' program to give
-the user some better disgnostic messages. Currently there are two
+the user some better diagnostic messages. Currently there are two
forms of flags defined:
`fuzzy'
translator can judge if the translation requires further
modification, or is acceptable as is. Once satisfied with the
translation, she then removes this `fuzzy' attribute. The
- `msgmerge' programs inserts this when it combined the `msgid' and
+ `msgmerge' program inserts this when it combined the `msgid' and
`msgstr' entries after fuzzy search only. *Note Fuzzy Entries::.
`c-format'
saved onto a special stack. The command `m' (`po-push-location')
merely adds the location of current entry to the stack, pushing the
already saved locations under the new one. The command `r'
-(`po-pop-location') consumes the top stack element and reposition the
+(`po-pop-location') consumes the top stack element and repositions the
cursor to the entry associated with that top element. This position is
then lost, for the next `r' will move the cursor to the previously
saved location, and so on until no locations remain on the stack.
element, then go elsewhere with the intent of getting back later, she
ought to use `m' immediately after `r'.
- The command `x' (`po-exchange-location') simultaneously reposition
+ The command `x' (`po-exchange-location') simultaneously repositions
the cursor to the entry associated with the top element of the stack of
-saved locations, and replace that top element with the location of the
+saved locations, and replaces that top element with the location of the
current entry before the move. Consequently, repeating the `x' command
toggles alternatively between two entries. For achieving this, the
translator will position the cursor on the first entry, use `m', then
`M-x po-normalize'
Tidy the whole PO file by making entries more uniform.
- The special command `M-x po-normalize', which has no associate keys,
-revises all entries, ensuring that strings of both original and
+ The special command `M-x po-normalize', which has no associated
+keys, revises all entries, ensuring that strings of both original and
translated entries use uniform internal quoting in the PO file. It
also removes any crumb after the last entry. This command may be
useful for PO files freshly imported from elsewhere, or if we ever
* Menu:
* Triggering:: Triggering `gettext' Operations
-* Mark Keywords:: How Marks Appears in Sources
+* Mark Keywords:: How Marks Appear in Sources
* Marking:: Marking Translatable Strings
* c-format:: Telling something about the following string
* Special cases:: Special Cases of Translatable Strings
example this would mean that a source code using the c, (c-cedilla
character) is runnable in France but not in the U.S.
- Some systems also have problems with parsing number using the
+ Some systems also have problems with parsing numbers using the
`scanf' functions if an other but the `LC_ALL' locale is used. The
standards say that additional formats but the one known in the `"C"'
locale might be recognized. But some systems seem to reject numbers in
\1f
File: gettext.info, Node: Mark Keywords, Next: Marking, Prev: Triggering, Up: Sources
-How Marks Appears in Sources
-============================
+How Marks Appear in Sources
+===========================
All strings requiring translation should be marked in the C sources.
Marking is done in such a way that each translatable string appears to
understand.
For packages following the GNU coding standards, there is a make
-goal `tags' or `TAGS' which construct the tag files in all directories
+goal `tags' or `TAGS' which constructs the tag files in all directories
and for all files containing source code.
Once your `TAGS' file is ready, the following commands assist the
possible keywords. This command with a prefix allows some
management of these keywords.
- The `,' (`po-tags-search') command search for the next occurrence of
-a string which looks like a possible candidate for translation, and
+ The `,' (`po-tags-search') command searches for the next occurrence
+of a string which looks like a possible candidate for translation, and
displays the program source in another Emacs window, positioned in such
a way that the string is near the top of this other window. If the
string is too big to fit whole in this window, it is positioned so only
because the original code does not refer to any parameter.
`xgettext' of course could make a wrong decision the other way
-round. A string marked as a format string is not really a format
+round, i.e. a string marked as a format string actually is not a format
string. In this case the `msgfmt' might give too many warnings and
would prevent translating the `.po' file. The method to prevent this
wrong decision is similar to the one used above, only the comment to
`--debug'
Use the flags `c-format' and `possible-c-format' to show who was
- responsible for marking a message as a format string. The later
+ responsible for marking a message as a format string. The latter
form is used if the `xgettext' program decided, the format form is
used if the programmer prescribed it.
them from the command line.
`--force'
- Always write output file even if no message is defined.
+ Always write an output file even if no message is defined.
`-h'
`--help'
Generate sorted output and remove duplicates.
`--strict'
- Write out strict Uniforum conforming PO file.
+ Write out a strict Uniforum conforming PO file.
`-v'
`--version'
=============
Each PO file entry may have a set of "attributes", which are
-qualities given an name and explicitely associated with the entry
-translation, using a special system comment. One of these attributes
-has the name `fuzzy', and entries having this attribute are said to
-have a fuzzy translation. They are called fuzzy entries, for short.
+qualities given a name and explicitely associated with the translation,
+using a special system comment. One of these attributes has the name
+`fuzzy', and entries having this attribute are said to have a fuzzy
+translation. They are called fuzzy entries, for short.
Fuzzy entries, even if they account for translated entries for most
other purposes, usually call for revision by the translator. Those may
easily recognizable by the fact they end with `msgstr ""'.
The work of the translator might be (quite naively) seen as the
-process of seeking after an untranslated entry, editing a translation
-for it, and repeating these actions until no untranslated entries
-remain. Some commands are more specifically related to untranslated
-entry processing.
+process of seeking for an untranslated entry, editing a translation for
+it, and repeating these actions until no untranslated entries remain.
+Some commands are more specifically related to untranslated entry
+processing.
`u'
Find the next untranslated entry.
It is possible to arrange so, whenever editing an untranslated
entry, the `<LFD>' command be automatically executed. If you set
`po-auto-edit-with-msgid' to `t', the translation gets initialised with
-the original string, in case none exist already. The default value for
-`po-auto-edit-with-msgid' is `nil'.
+the original string, in case none exists already. The default value
+for `po-auto-edit-with-msgid' is `nil'.
In fact, whether it is best to start a translation with an empty
string, or rather with a copy of the original string, is a matter of
To facilitate exchanges with buffers which are not in PO mode, the
translation string put on the kill ring by the `k' command is fully
-unquoted before being saved: external quotes are removed, multi-lines
-strings are concatenated, and backslashed escaped sequences are turned
+unquoted before being saved: external quotes are removed, multi-line
+strings are concatenated, and backslash escaped sequences are turned
into their corresponding characters. In the special case of obsolete
entries, the translation is also uncommented prior to saving.
Note that `k' or `w' are not the only commands pushing strings on
the kill ring, as almost any PO mode command replacing translation
-strings (or the translator comments) automatically save the old string
+strings (or the translator comments) automatically saves the old string
on the kill ring. The main exceptions to this general rule are the
yanking commands themselves.
unmodified string. Once found, she uses the `<DEL>' command for
deleting the obsolete entry, knowing that `<DEL>' also _kills_ the
translation, that is, pushes the translation on the kill ring. Then,
-`r' returns to the initial untranslated entry, `y' then _yanks_ the
+`r' returns to the initial untranslated entry, and `y' then _yanks_ the
saved translation right into the `msgstr' field. The translator is
then free to use `<RET>' for fine tuning the translation contents, and
maybe to later use `u', then `m' again, for going on with the next
Functions found on `po-subedit-mode-hook', if any, are executed after
the string has been inserted in the edit buffer.
- The command `K' (`po-kill-comment') get rid of all translator
+ The command `K' (`po-kill-comment') gets rid of all translator
comments, while saving those comments on the kill ring. The command
`W' (`po-kill-ring-save-comment') takes a copy of the translator
comments on the kill ring, but leaves them undisturbed in the current
`C-c C-a'
Consult auxiliary PO files.
- The windows contents represents a translation for a given message,
+ The window's contents represents a translation for a given message,
or a translator comment. The translator may modify this window to her
heart's content. Once this done, the command `C-c C-c'
(`po-subedit-exit') may be used to return the edited translation into
the string has been inserted in the edit buffer.
While editing her translation, the translator should pay attention
-to not inserting unwanted `<RET>' (carriage returns) characters at the
-end of the translated string if those are not meant to be there, or to
-removing such characters when they are required. Since these
-characters are not visible in the editing buffer, they are easily
-introduced by mistake. To help her, `<RET>' automatically puts the
-character `<' at the end of the string being edited, but this `<' is
-not really part of the string. On exiting the editing window with
-`C-c C-c', PO mode automatically removes such `<' and all whitespace
-added after it. If the translator adds characters after the
-terminating `<', it looses its delimiting property and integrally
-becomes part of the string. If she removes the delimiting `<', then
-the edited string is taken _as is_, with all trailing newlines, even if
-invisible. Also, if the translated string ought to end itself with a
-genuine `<', then the delimiting `<' may not be removed; so the string
-should appear, in the editing window, as ending with two `<' in a row.
+to not inserting unwanted `<RET>' (newline) characters at the end of
+the translated string if those are not meant to be there, or to removing
+such characters when they are required. Since these characters are not
+visible in the editing buffer, they are easily introduced by mistake.
+To help her, `<RET>' automatically puts the character `<' at the end of
+the string being edited, but this `<' is not really part of the string.
+On exiting the editing window with `C-c C-c', PO mode automatically
+removes such `<' and all whitespace added after it. If the translator
+adds characters after the terminating `<', it looses its delimiting
+property and integrally becomes part of the string. If she removes the
+delimiting `<', then the edited string is taken _as is_, with all
+trailing newlines, even if invisible. Also, if the translated string
+ought to end itself with a genuine `<', then the delimiting `<' may not
+be removed; so the string should appear, in the editing window, as
+ending with two `<' in a row.
When a translation (or a comment) is being edited, the translator
may move the cursor back into the PO file buffer and freely move to
buffer. It is possible to simultaneously edit the translation _and_
the comment of a single entry, or to edit entries in different PO
files, all at once. Typing `<RET>' on a field already being edited
-merely resume that particular edit. Yet, the translator should better
+merely resumes that particular edit. Yet, the translator should better
be comfortable at handling many Emacs windows!
Pending subedits may be completed or aborted in any order, regardless
once the last has been shown.
The command `M-s' behaves differently. Instead of cycling through
-references, it lets the translator choose of particular reference among
+references, it lets the translator choose a particular reference among
many, and displays that reference. It is best used with completion, if
the translator types `<TAB>' immediately after `M-s', in response to
the question, she will be offered a menu of all possible references, as
implementation. Currently this only affects the naming of the
output file. If this option is not given the name of the output
file is the same as the domain name. If the strict Uniforum mode
- is enable the suffix `.mo' is added to the file name if it is not
+ is enabled the suffix `.mo' is added to the file name if it is not
already present.
We find this behaviour of Sun's implementation rather silly and so
and compared. It is considered abnormal that one string starts or
ends with a newline while the other does not.
- Also, if the string represents a format sring used in a
+ Also, if the string represents a format string used in a
`printf'-like function both strings should have the same number of
`%' format specifiers, with matching types. If the flag
`c-format' or `possible-c-format' appears in the special comment
Nothing prevents a MO file from having embedded <NUL>s in strings.
However, the program interface currently used already presumes that
strings are <NUL> terminated, so embedded <NUL>s are somewhat useless.
-But MO file format is general enough so other interfaces would be later
-possible, if for example, we ever want to implement wide characters
-right in MO files, where <NUL> bytes may accidently appear. (No, we
-don't want to have wide characters in MO files. They would make the
-file unnecessarily large, and the `wchar_t' type being platform
-dependent, MO files would be platform dependent as well.)
+But the MO file format is general enough so other interfaces would be
+later possible, if for example, we ever want to implement wide
+characters right in MO files, where <NUL> bytes may accidently appear.
+(No, we don't want to have wide characters in MO files. They would
+make the file unnecessarily large, and the `wchar_t' type being
+platform dependent, MO files would be platform dependent as well.)
This particular issue has been strongly debated in the GNU `gettext'
development forum, and it is expectable that MO file format will evolve
The User's View
***************
- When GNU `gettext' will truly have reached is goal, average users
+ When GNU `gettext' will truly have reached its goal, average users
should feel some kind of astonished pleasure, seeing the effect of that
strange kind of magic that just makes their own native language appear
everywhere on their screens. As for naive users, they would ideally
undertaking, and information is available about the progress of the
Translation Project.
- When a package is distributed, there are two kind of users:
+ When a package is distributed, there are two kinds of users:
"installers" who fetch the distribution, unpack it, configure it,
compile it and install it for themselves or others to use; and "end
users" that call programs of the package, once these have been
More generally, a matrix is available for showing the current state
of the Translation Project, listing which packages are prepared for
-multi-lingual messages, and which languages is supported by each.
+multi-lingual messages, and which languages are supported by each.
Because this information changes often, this matrix is not kept within
this GNU `gettext' manual. This information is often found in file
`ABOUT-NLS' from various distributions, but is also as old as the
We consider here those packages using GNU `gettext' internally, and
for which the installers did not disable translation at _configure_
time. Then, users only have to set the `LANG' environment variable to
-the appropriate `LL' prior to using the programs in the package. *Note
-Matrix::. For example, let's presume a German site. At the shell
-prompt, users merely have to execute `setenv LANG de' (in `csh') or
-`export LANG; LANG=de' (in `sh'). They could even do this from their
-`.login' or `.profile' file.
+the appropriate `LL_CC' combination prior to using the programs in the
+package. *Note Matrix::. For example, let's presume a German site.
+At the shell prompt, users merely have to execute `setenv LANG de_DE'
+(in `csh') or `export LANG; LANG=de_DE' (in `sh'). They could even do
+this from their `.login' or `.profile' file.
\1f
File: gettext.info, Node: Programmers, Next: Translators, Prev: Users, Up: Top
One aim of the current message catalog implementation provided by
GNU `gettext' was to use the systems message catalog handling, if the
installer wishes to do so. So we perhaps should first take a look at
-the solutions we know about. The people in the POSIX committee does not
+the solutions we know about. The people in the POSIX committee did not
manage to agree on one of the semi-official standards which we'll
-describe below. In fact they couldn't agree on anything, so nothing
-decide only to include an example of an interface. The major Unix
+describe below. In fact they couldn't agree on anything, so they
+decided only to include an example of an interface. The major Unix
vendors are split in the usage of the two most important
-specifications: X/Opens catgets vs. Uniforums gettext interface. We'll
-describe them both and later explain our solution of this dilemma.
+specifications: X/Open's catgets vs. Uniforum's gettext interface.
+We'll describe them both and later explain our solution of this dilemma.
* Menu:
But we must not forget one point: after all the trouble with
transfering the rights on Unix(tm) they at last came to X/Open, the
-very same who published this specifications. This leads me to making
+very same who published this specification. This leads me to making
the prediction that this interface will be in future Unix standards
(e.g. Spec1170) and therefore part of all Unix implementation
(implementations, which are _allowed_ to wear this name).
given as a default value in case when one of the addressing stages
fail. One important thing to remember is that although the return type
of catgets is `char *' the resulting string _must not_ be changed. It
-should better `const char *', but the standard is published in 1988,
+should better be `const char *', but the standard is published in 1988,
one year before ANSI C.
The last of these function functions is used and behaves as expected:
Problems with the `catgets' Interface?!
---------------------------------------
- Now that this descriptions seemed to be really easy where are the
-problem we speak of. In fact the interface could be used in a
+ Now that this description seemed to be really easy -- where are the
+problem we speak of? In fact the interface could be used in a
reasonable way, but constructing the message catalogs is a pain. The
reason for this lies in the third argument of `catgets': the unique
message ID. This has to be a numeric value for all messages in a single
-set. Perhaps you could imagine the problems keeping such list while
+set. Perhaps you could imagine the problems keeping such a list while
changing the source code. Add a new message here, remove one there. Of
course there have been developed a lot of tools helping to organize this
chaos but one as the other fails in one aspect or the other. We don't
want to say that the other approach has no problems but they are far
-more easily to manage.
+more easy to manage.
perhaps impossible) and b) to access a string in a selected domain.
This is principally the description of the `gettext' interface. It
-has an global domain which unqualified usages reference. Of course this
+has a global domain which unqualified usages reference. Of course this
domain is selectable by the user.
char *textdomain (const char *domain_name);
Solving Ambiguities
-------------------
- While this single name domain work good for most applications there
+ While this single name domain works well for most applications there
might be the need to get translations from more than one domain. Of
course one could switch between different domains with calls to
`textdomain', but this is really not convenient nor is it fast. A
-possible situation could be one case discussing while this writing: all
-error messages of functions in the set of common used functions should
-go into a separate domain `error'. By this mean we would only need to
-translate them once.
+possible situation could be one case subject to discussion during this
+writing: all error messages of functions in the set of common used
+functions should go into a separate domain `error'. By this mean we
+would only need to translate them once. Another case are messages from
+a library, as these _have_ to be independent of the current domain set
+by the application.
For this reasons there are two more functions to retrieve strings:
inside language families);
* The form how plural forms are build differs. This is a problem
- with language which have many irregularities. German, for
+ with languages which have many irregularities. German, for
instance, is a drastic case. Though English and German are part
of the same language family (Germanic), the almost regular forming
of plural noun forms (appending an `s') is hardly found in German.
extended `gettext' interface should be used.
These extra functions are taking instead of the one key string two
-strings and an numerical argument. The idea behind this is that using
+strings and a numerical argument. The idea behind this is that using
the numerical argument and the first string as a key, the implementation
can select using rules specified by the translator the right plural
form. The two string arguments then will be used to provide a return
message catalog is found MSGID1 is returned if `n == 1', otherwise
`msgid2'.
- An example for the us of this function is:
+ An example for the use of this function is:
printf (ngettext ("%d file removed", "%d files removed", n), n);
specify the rules of how to select the plural form. Since the formula
varies with every language this is the only viable solution except for
hardcoding the information in the code (which still would require the
-possibility of extensions to not prevent the use of new languages). The
-details are explained in the GNU `gettext' manual. Here only a a bit
-of information is provided.
+possibility of extensions to not prevent the use of new languages).
The information about the plural form selection has to be stored in
the header entry of the PO file (the one with the empty `msgid' string).
The `nplurals' value must be a decimal number which specifies how
many different plural forms exist for this language. The string
following `plural' is an expression which is using the C language
-syntax. Exceptions are that no negative number are allowed, numbers
+syntax. Exceptions are that no negative numbers are allowed, numbers
must be decimal, and the only variable allowed is `n'. This expression
will be evaluated whenever one of the functions `ngettext',
`dngettext', or `dcngettext' is called. The numeric value passed to
Danish, Dutch, English, German, Norwegian, Swedish
Finno-Ugric family
- Finnish
+ Estonian, Finnish
Latin/Greek family
Greek
Celtic
Gaeilge
-Three forms, special case for one and all numbers ending in 2, 3, or 4
+Three forms, special case for numbers ending in 1[2-9]
The header entry would look like this:
Plural-Forms: nplurals=3; \
- plural=n==1 ? 0 : n%10>=2 && n%10<=4 ? 1 : 2;
+ plural=n%10==1 && n%100!=11 ? 0 : \
+ n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2;
+
+ Languages with this property include:
+
+ Baltic family
+ Lithuanian
+
+Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4]
+ The header entry would look like this:
+
+ Plural-Forms: nplurals=3; \
+ plural=n%10==1 && n%100!=11 ? 0 : \
+ n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
Languages with this property include:
Slavic family
- Russian
+ Czech, Russian, Slovak, Ukrainian
Three forms, special case for one and some numbers ending in 2, 3, or 4
The header entry would look like this:
Slavic family
Polish
-Four forms, special case for one and all numbers ending in 2, 3, or 4
+Four forms, special case for one and all numbers ending in 02, 03, or 04
The header entry would look like this:
Plural-Forms: nplurals=4; \
- plural=n==1 ? 0 : \
- n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3;
+ plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;
Languages with this property include:
this context and it also is a character not often used in message
strings.
- But what if the character is used in message strings. Or if the
+ But what if the character is used in message strings? Or if the
chose character is not available in the character set on the
machine one compiles (e.g., `|' is not required to exist for
ISO C; this is why the `iso646.h' file exists in ISO C programming
environments).
There is only one more comment to be said. The wrapper function
-above require that the translations strings are not enlengthened
+above requires that the translations strings are not enlengthened
themselves. This is only logical. There is no need to disambiguate
the strings (since they are never used as keys for a search) and one
also saves quite some memory and disk space by doing this.
escape the point by point descriptions used in the remainder of this
chapter. So, we describe them here.
- * Before attempting to use you should install some other packages
- first. Ensure that recent versions of GNU `m4', GNU Autoconf and
- GNU `gettext' are already installed at your site, and if not,
- proceed to do this first. If you got to install these things,
- beware that GNU `m4' must be fully installed before GNU Autoconf
- is even _configured_.
+ * Before attempting to use `gettextize' you should install some
+ other packages first. Ensure that recent versions of GNU `m4',
+ GNU Autoconf and GNU `gettext' are already installed at your site,
+ and if not, proceed to do this first. If you got to install these
+ things, beware that GNU `m4' must be fully installed before GNU
+ Autoconf is even _configured_.
To further ease the task of a package maintainer the `automake'
package was designed and implemented. GNU `gettext' now uses this
So, here comes a list of files, each one followed by a description of
all alterations it needs. Many examples are taken out from the GNU
-`gettext' 0.10.36 distribution itself. You may indeed refer to the
+`gettext' 0.10.37 distribution itself. You may indeed refer to the
source code of the GNU `gettext' package, as it is intended to be a
good example and master implementation for using its own functionality.
* po/POTFILES.in:: `POTFILES.in' in `po/'
* configure.in:: `configure.in' at top level
+* config.guess:: `config.guess', `config.sub' at top level
* aclocal:: `aclocal.m4' at top level
* acconfig:: `acconfig.h' at top level
* Makefile:: `Makefile.in' at top level
src/msgfmt.c
src/xgettext.c
-Dashed comments and white lines are ignored. All other lines list
+Hash-marked comments and white lines are ignored. All other lines list
those source files containing strings marked for translation (*note
Mark Keywords::), in a notation relative to the top level of your whole
distribution, rather than the location of the `POTFILES.in' file itself.
\1f
-File: gettext.info, Node: configure.in, Next: aclocal, Prev: po/POTFILES.in, Up: Adjusting Files
+File: gettext.info, Node: configure.in, Next: config.guess, Prev: po/POTFILES.in, Up: Adjusting Files
`configure.in' at top level
---------------------------
This is done by a set of lines like these:
PACKAGE=gettext
- VERSION=0.10.36
+ VERSION=0.10.37
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
Of course, you replace `gettext' with the name of your package,
- and `0.10.36' by its version numbers, exactly as they should
+ and `0.10.37' by its version numbers, exactly as they should
appear in the packaged `tar' file name of your distribution
- (`gettext-0.10.36.tar.gz', here).
+ (`gettext-0.10.37.tar.gz', here).
2. Declare the available translations.
\1f
-File: gettext.info, Node: aclocal, Next: acconfig, Prev: configure.in, Up: Adjusting Files
+File: gettext.info, Node: config.guess, Next: aclocal, Prev: configure.in, Up: Adjusting Files
+
+`config.guess', `config.sub' at top level
+-----------------------------------------
+
+ You need to add the GNU `config.guess' and `config.sub' files to
+your distribution. They are needed because the `intl/' directory has
+platform dependent support for determining the locale's character
+encoding and therefore needs to identify the platform.
+
+ You can obtain the newest version of `config.guess' and `config.sub'
+from `ftp://ftp.gnu.org/pub/gnu/config/'. Less recent versions are
+also contained in the GNU `automake' and GNU `libtool' packages.
+
+ Normally, `config.guess' and `config.sub' are put at the top level
+of a distribution. But it is also possible to put them in a
+subdirectory, altogether with other configuration support files like
+`install-sh', `ltconfig', `ltmain.sh', `mkinstalldirs' or `missing'.
+All you need to do, other than moving the files, is to add the
+following line to your `configure.in'.
+
+ AC_CONFIG_AUX_DIR([SUBDIR])
+
+\1f
+File: gettext.info, Node: aclocal, Next: acconfig, Prev: config.guess, Up: Adjusting Files
`aclocal.m4' at top level
-------------------------
If you do not have an `aclocal.m4' file in your distribution, the
-simplest is taking a copy of `aclocal.m4' from GNU `gettext'. But to
-be precise, you only need macros `AM_LC_MESSAGES', `AM_WITH_NLS' and
-`AM_GNU_GETTEXT', and `AM_PATH_PROG_WITH_TEST', which is called by
-`AM_WITH_NLS', so you may use an editor and remove macros you do not
-need.
+simplest is to concatenate the files `codeset.m4', `gettext.m4',
+`iconv.m4', `isc-posix.m4', `lcmessage.m4', `progtest.m4' from GNU
+`gettext''s `m4/' directory into a single file.
If you already have an `aclocal.m4' file, then you will have to
-merge the said macros into your `aclocal.m4'. Note that if you are
-upgrading from a previous release of GNU `gettext', you should most
-probably _replace_ the said macros, as they usually change a little
-from one release of GNU `gettext' to the next. Their contents may vary
-as we get more experience with strange systems out there.
+merge the said macro files into your `aclocal.m4'. Note that if you
+are upgrading from a previous release of GNU `gettext', you should most
+probably _replace_ the macros (`AM_GNU_GETTEXT', `AM_WITH_NLS', etc.),
+as they usually change a little from one release of GNU `gettext' to
+the next. Their contents may vary as we get more experience with
+strange systems out there.
These macros check for the internationalization support functions
and related informations. Hopefully, once stabilized, these macros
`acconfig.h' at top level
-------------------------
- If you do not have an `acconfig.h' file in your distribution, the
-simplest is use take a copy of `acconfig.h' from GNU `gettext'. But to
-be precise, you only need the lines and comments for `ENABLE_NLS',
-`HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY', `PACKAGE' and
-`VERSION', so you may use an editor and remove everything else. If you
-already have an `acconfig.h' file, then you should merge the said
-definitions into your `acconfig.h'.
+ Earlier GNU `gettext' releases required to put definitions for
+`ENABLE_NLS', `HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY',
+`PACKAGE' and `VERSION' into an `acconfig.h' file. This is not needed
+any more; you can remove them from your `acconfig.h' file unless your
+package uses them independently from the `intl/' directory.
\1f
File: gettext.info, Node: Makefile, Next: src/Makefile, Prev: acconfig, Up: Adjusting Files
example, we also define `SUBDIRS' in `Makefile.in' for it to be
further used in the `dist:' goal.
- SUBDIRS = doc lib @INTLSUB@ src @POSUB@
+ SUBDIRS = doc intl lib src @POSUB@
+
+ Note that you must arrange for `make' to descend into the `intl'
+ directory before descending into other directories containing code
+ which make use of the `libintl.h' header file. For this reason,
+ here we mention `intl' before `lib' and `src'.
that you will have to adapt to your own package.
subdir = src
- 4. You should ensure that the final linking will use `@INTLLIBS@' as
+ 4. The `main' function of your program will normally call
+ `bindtextdomain' (see *note Triggering::), like this:
+
+ bindtextdomain (PACKAGE, LOCALEDIR);
+
+ To make LOCALEDIR known to the program, add the following lines to
+ Makefile.in:
+
+ datadir = @datadir@
+ localedir = $(datadir)/locale
+ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
+ Note that `@datadir@' defaults to `$(prefix)/share', thus
+ `$(localedir)' defaults to `$(prefix)/share/locale'.
+
+ 5. You should ensure that the final linking will use `@INTLLIBS@' as
a library. An easy way to achieve this is to manage that it gets
into `LIBS', like this:
LIBS = ../lib/libsupport.a @INTLLIBS@ ../lib/libsupport.a @LIBS@
- 5. You should also ensure that directory `intl/' will be searched for
+ 6. You should also ensure that directory `intl/' will be searched for
C preprocessor include files in all circumstances. So, you have to
manage so both `-I../intl' and `-I$(top_srcdir)/intl' will be
given to the C compiler.
- 6. Your `dist:' goal has to conform with others. Here is a
+ 7. Your `dist:' goal has to conform with others. Here is a
reasonable definition for it:
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
together with French translations of many Linux-related documents.
\1f
-File: gettext.info, Node: Language Codes, Prev: Conclusion, Up: Top
+File: gettext.info, Node: Language Codes, Next: Country Codes, Prev: Conclusion, Up: Top
Language Codes
**************
`ab'
Abkhazian.
+`ae'
+ Avestan.
+
`af'
Afrikaans.
Bashkir.
`be'
- Byelorussian.
+ Byelorussian; Belarusian.
`bg'
Bulgarian.
`br'
Breton.
+`bs'
+ Bosnian.
+
`ca'
Catalan.
+`ce'
+ Chechen.
+
+`ch'
+ Chamorro.
+
`co'
Corsican.
`cs'
Czech.
+`cu'
+ Church Slavic.
+
+`cv'
+ Chuvash.
+
`cy'
Welsh.
German.
`dz'
- Bhutani.
+ Dzongkha; Bhutani.
`el'
Greek.
Finnish.
`fj'
- Fiji.
+ Fijian; Fiji.
`fo'
Faroese.
Irish.
`gd'
- Scots Gaelic.
+ Scots; Gaelic.
`gl'
- Galician.
+ Gallegan; Galician.
`gn'
Guarani.
`gu'
Gujarati.
+`gv'
+ Manx.
+
`ha'
- Hausa.
+ Hausa (?).
`he'
Hebrew (formerly iw).
`hi'
Hindi.
+`ho'
+ Hiri Motu.
+
`hr'
Croatian.
`hy'
Armenian.
+`hz'
+ Herero.
+
`ia'
Interlingua.
`ka'
Georgian.
+`ki'
+ Kikuyu.
+
+`kj'
+ Kuanyama.
+
`kk'
Kazakh.
`kl'
- Greenlandic.
+ Kalaallisut; Greenlandic.
`km'
- Cambodian.
+ Khmer; Cambodian.
`kn'
Kannada.
`ku'
Kurdish.
+`kv'
+ Komi.
+
+`kw'
+ Cornish.
+
`ky'
Kirghiz.
`la'
Latin.
+`lb'
+ Letzeburgesch.
+
`ln'
Lingala.
`lo'
- Laothian.
+ Lao; Laotian.
`lt'
Lithuanian.
`lv'
- Latvian, Lettish.
+ Latvian; Lettish.
`mg'
Malagasy.
+`mh'
+ Marshall.
+
`mi'
Maori.
`na'
Nauru.
+`nb'
+ Norwegian Bokmaal.
+
+`nd'
+ Ndebele, North.
+
`ne'
Nepali.
+`ng'
+ Ndonga.
+
`nl'
Dutch.
+`nn'
+ Norwegian Nynorsk.
+
`no'
Norwegian.
+`nr'
+ Ndebele, South.
+
+`nv'
+ Navajo.
+
+`ny'
+ Chichewa; Nyanja.
+
`oc'
- Occitan.
+ Occitan; Provenc,al.
`om'
(Afan) Oromo.
`or'
Oriya.
+`os'
+ Ossetian; Ossetic.
+
`pa'
- Punjabi.
+ Panjabi; Punjabi.
+
+`pi'
+ Pali.
`pl'
Polish.
Rhaeto-Romance.
`rn'
- Kirundi.
+ Rundi; Kirundi.
`ro'
Romanian.
`sa'
Sanskrit.
+`sc'
+ Sardinian.
+
`sd'
Sindhi.
-`sg'
- Sangro.
+`se'
+ Northern Sami.
-`sh'
- Serbo-Croatian.
+`sg'
+ Sango; Sangro.
`si'
Sinhalese.
Serbian.
`ss'
- Siswati.
+ Swati; Siswati.
`st'
- Sesotho.
+ Sesotho; Sotho, Southern.
`su'
Sundanese.
Tagalog.
`tn'
- Setswana.
+ Tswana; Setswana.
`to'
- Tonga.
+ Tonga (?).
`tr'
Turkish.
`tw'
Twi.
+`ty'
+ Tahitian.
+
`ug'
Uighur.
Vietnamese.
`vo'
- Volapuk.
+ Volapu"k; Volapuk.
`wo'
Wolof.
`zu'
Zulu.
+\1f
+File: gettext.info, Node: Country Codes, Prev: Language Codes, Up: Top
+
+Country Codes
+*************
+
+ The ISO 3166 standard defines two character codes for many countries
+and territories. All abbreviations for countries used in the
+Translation Project should come from this standard.
+
+`AD'
+ Andorra.
+
+`AE'
+ United Arab Emirates.
+
+`AF'
+ Afghanistan.
+
+`AG'
+ Antigua and Barbuda.
+
+`AI'
+ Anguilla.
+
+`AL'
+ Albania.
+
+`AM'
+ Armenia.
+
+`AN'
+ Netherlands Antilles.
+
+`AO'
+ Angola.
+
+`AQ'
+ Antarctica.
+
+`AR'
+ Argentina.
+
+`AS'
+ Samoa (American).
+
+`AT'
+ Austria.
+
+`AU'
+ Australia.
+
+`AW'
+ Aruba.
+
+`AZ'
+ Azerbaijan.
+
+`BA'
+ Bosnia and Herzegovina.
+
+`BB'
+ Barbados.
+
+`BD'
+ Bangladesh.
+
+`BE'
+ Belgium.
+
+`BF'
+ Burkina Faso.
+
+`BG'
+ Bulgaria.
+
+`BH'
+ Bahrain.
+
+`BI'
+ Burundi.
+
+`BJ'
+ Benin.
+
+`BM'
+ Bermuda.
+
+`BN'
+ Brunei.
+
+`BO'
+ Bolivia.
+
+`BR'
+ Brazil.
+
+`BS'
+ Bahamas.
+
+`BT'
+ Bhutan.
+
+`BV'
+ Bouvet Island.
+
+`BW'
+ Botswana.
+
+`BY'
+ Belarus.
+
+`BZ'
+ Belize.
+
+`CA'
+ Canada.
+
+`CC'
+ Cocos (Keeling) Islands.
+
+`CD'
+ Congo (Dem. Rep.).
+
+`CF'
+ Central African Rep..
+
+`CG'
+ Congo (Rep.).
+
+`CH'
+ Switzerland.
+
+`CI'
+ Cote d'Ivoire.
+
+`CK'
+ Cook Islands.
+
+`CL'
+ Chile.
+
+`CM'
+ Cameroon.
+
+`CN'
+ China.
+
+`CO'
+ Colombia.
+
+`CR'
+ Costa Rica.
+
+`CU'
+ Cuba.
+
+`CV'
+ Cape Verde.
+
+`CX'
+ Christmas Island.
+
+`CY'
+ Cyprus.
+
+`CZ'
+ Czech Republic.
+
+`DE'
+ Germany.
+
+`DJ'
+ Djibouti.
+
+`DK'
+ Denmark.
+
+`DM'
+ Dominica.
+
+`DO'
+ Dominican Republic.
+
+`DZ'
+ Algeria.
+
+`EC'
+ Ecuador.
+
+`EE'
+ Estonia.
+
+`EG'
+ Egypt.
+
+`EH'
+ Western Sahara.
+
+`ER'
+ Eritrea.
+
+`ES'
+ Spain.
+
+`ET'
+ Ethiopia.
+
+`FI'
+ Finland.
+
+`FJ'
+ Fiji.
+
+`FK'
+ Falkland Islands.
+
+`FM'
+ Micronesia.
+
+`FO'
+ Faeroe Islands.
+
+`FR'
+ France.
+
+`GA'
+ Gabon.
+
+`GB'
+ Britain (UK).
+
+`GD'
+ Grenada.
+
+`GE'
+ Georgia.
+
+`GF'
+ French Guiana.
+
+`GH'
+ Ghana.
+
+`GI'
+ Gibraltar.
+
+`GL'
+ Greenland.
+
+`GM'
+ Gambia.
+
+`GN'
+ Guinea.
+
+`GP'
+ Guadeloupe.
+
+`GQ'
+ Equatorial Guinea.
+
+`GR'
+ Greece.
+
+`GS'
+ South Georgia and the South Sandwich Islands.
+
+`GT'
+ Guatemala.
+
+`GU'
+ Guam.
+
+`GW'
+ Guinea-Bissau.
+
+`GY'
+ Guyana.
+
+`HK'
+ Hong Kong.
+
+`HM'
+ Heard Island and McDonald Islands.
+
+`HN'
+ Honduras.
+
+`HR'
+ Croatia.
+
+`HT'
+ Haiti.
+
+`HU'
+ Hungary.
+
+`ID'
+ Indonesia.
+
+`IE'
+ Ireland.
+
+`IL'
+ Israel.
+
+`IN'
+ India.
+
+`IO'
+ British Indian Ocean Territory.
+
+`IQ'
+ Iraq.
+
+`IR'
+ Iran.
+
+`IS'
+ Iceland.
+
+`IT'
+ Italy.
+
+`JM'
+ Jamaica.
+
+`JO'
+ Jordan.
+
+`JP'
+ Japan.
+
+`KE'
+ Kenya.
+
+`KG'
+ Kyrgyzstan.
+
+`KH'
+ Cambodia.
+
+`KI'
+ Kiribati.
+
+`KM'
+ Comoros.
+
+`KN'
+ St Kitts and Nevis.
+
+`KP'
+ Korea (North).
+
+`KR'
+ Korea (South).
+
+`KW'
+ Kuwait.
+
+`KY'
+ Cayman Islands.
+
+`KZ'
+ Kazakhstan.
+
+`LA'
+ Laos.
+
+`LB'
+ Lebanon.
+
+`LC'
+ St Lucia.
+
+`LI'
+ Liechtenstein.
+
+`LK'
+ Sri Lanka.
+
+`LR'
+ Liberia.
+
+`LS'
+ Lesotho.
+
+`LT'
+ Lithuania.
+
+`LU'
+ Luxembourg.
+
+`LV'
+ Latvia.
+
+`LY'
+ Libya.
+
+`MA'
+ Morocco.
+
+`MC'
+ Monaco.
+
+`MD'
+ Moldova.
+
+`MG'
+ Madagascar.
+
+`MH'
+ Marshall Islands.
+
+`MK'
+ Macedonia.
+
+`ML'
+ Mali.
+
+`MM'
+ Myanmar (Burma).
+
+`MN'
+ Mongolia.
+
+`MO'
+ Macao.
+
+`MP'
+ Northern Mariana Islands.
+
+`MQ'
+ Martinique.
+
+`MR'
+ Mauritania.
+
+`MS'
+ Montserrat.
+
+`MT'
+ Malta.
+
+`MU'
+ Mauritius.
+
+`MV'
+ Maldives.
+
+`MW'
+ Malawi.
+
+`MX'
+ Mexico.
+
+`MY'
+ Malaysia.
+
+`MZ'
+ Mozambique.
+
+`NA'
+ Namibia.
+
+`NC'
+ New Caledonia.
+
+`NE'
+ Niger.
+
+`NF'
+ Norfolk Island.
+
+`NG'
+ Nigeria.
+
+`NI'
+ Nicaragua.
+
+`NL'
+ Netherlands.
+
+`NO'
+ Norway.
+
+`NP'
+ Nepal.
+
+`NR'
+ Nauru.
+
+`NU'
+ Niue.
+
+`NZ'
+ New Zealand.
+
+`OM'
+ Oman.
+
+`PA'
+ Panama.
+
+`PE'
+ Peru.
+
+`PF'
+ French Polynesia.
+
+`PG'
+ Papua New Guinea.
+
+`PH'
+ Philippines.
+
+`PK'
+ Pakistan.
+
+`PL'
+ Poland.
+
+`PM'
+ St Pierre and Miquelon.
+
+`PN'
+ Pitcairn.
+
+`PR'
+ Puerto Rico.
+
+`PS'
+ Palestine.
+
+`PT'
+ Portugal.
+
+`PW'
+ Palau.
+
+`PY'
+ Paraguay.
+
+`QA'
+ Qatar.
+
+`RE'
+ Reunion.
+
+`RO'
+ Romania.
+
+`RU'
+ Russia.
+
+`RW'
+ Rwanda.
+
+`SA'
+ Saudi Arabia.
+
+`SB'
+ Solomon Islands.
+
+`SC'
+ Seychelles.
+
+`SD'
+ Sudan.
+
+`SE'
+ Sweden.
+
+`SG'
+ Singapore.
+
+`SH'
+ St Helena.
+
+`SI'
+ Slovenia.
+
+`SJ'
+ Svalbard and Jan Mayen.
+
+`SK'
+ Slovakia.
+
+`SL'
+ Sierra Leone.
+
+`SM'
+ San Marino.
+
+`SN'
+ Senegal.
+
+`SO'
+ Somalia.
+
+`SR'
+ Suriname.
+
+`ST'
+ Sao Tome and Principe.
+
+`SV'
+ El Salvador.
+
+`SY'
+ Syria.
+
+`SZ'
+ Swaziland.
+
+`TC'
+ Turks and Caicos Is.
+
+`TD'
+ Chad.
+
+`TF'
+ French Southern and Antarctic Lands.
+
+`TG'
+ Togo.
+
+`TH'
+ Thailand.
+
+`TJ'
+ Tajikistan.
+
+`TK'
+ Tokelau.
+
+`TM'
+ Turkmenistan.
+
+`TN'
+ Tunisia.
+
+`TO'
+ Tonga.
+
+`TP'
+ East Timor.
+
+`TR'
+ Turkey.
+
+`TT'
+ Trinidad and Tobago.
+
+`TV'
+ Tuvalu.
+
+`TW'
+ Taiwan.
+
+`TZ'
+ Tanzania.
+
+`UA'
+ Ukraine.
+
+`UG'
+ Uganda.
+
+`UM'
+ US minor outlying islands.
+
+`US'
+ United States.
+
+`UY'
+ Uruguay.
+
+`UZ'
+ Uzbekistan.
+
+`VA'
+ Vatican City.
+
+`VC'
+ St Vincent.
+
+`VE'
+ Venezuela.
+
+`VG'
+ Virgin Islands (UK).
+
+`VI'
+ Virgin Islands (US).
+
+`VN'
+ Vietnam.
+
+`VU'
+ Vanuatu.
+
+`WF'
+ Wallis and Futuna.
+
+`WS'
+ Samoa (Western).
+
+`YE'
+ Yemen.
+
+`YT'
+ Mayotte.
+
+`YU'
+ Yugoslavia.
+
+`ZA'
+ South Africa.
+
+`ZM'
+ Zambia.
+
+`ZW'
+ Zimbabwe.
+