The letters PO in `.po' files means Portable Object, to distinguish it from `.mo' files, where MO stands for Machine Object. This paradigm, as well as the PO file format, is inspired by the NLS standard developed by Uniforum, and implemented by Sun in their Solaris system.
PO files are meant to be read and edited by humans, and associate each
original, translatable string of a given package with its translation
in a particular target language. A single PO file is dedicated to
a single target language. If a package supports many languages,
there is one such PO file per language supported, and each package
has its own set of PO files. These PO files are best created by
the xgettext
program, and later updated or refreshed through
the tupdate
program. Program xgettext
extracts all
marked messages from a set of C files and initializes a PO file with
empty translations. Program tupdate
takes care of adjusting
PO files between releases of the corresponding sources, commenting
obsolete entries, initializing new ones, and updating all source
line references. Files ending with `.pot' are kind of base
translation files found in distributions, in PO file format, and
`.pox' files are often temporary PO files.
MO files are meant to be read by programs, and are binary in nature.
A few systems already offer tools for creating and handling MO files
as part of the Native Language Support coming with the system, but the
format of these MO files is often different from system to system,
and non-portable. They do not necessary use `.mo' for file
extensions, but since system libraries are also used for accessing
these files, it works as long as the system is self-consistent about
it. If GNU gettext
is able to interface with the tools already
provided with systems, it will consequently let these provided tools
take care of generating the MO files. Or else, if such tools are not
found or do not seem usable, GNU gettext
will use its own ways
and its own format for MO files. Files ending with `.gmo' are
really MO files, when it is known that these files use the GNU format.
Go to the first, previous, next, last section, table of contents.