gettext: Files
1
1 1.4 Files Conveying Translations
1 ================================
1
1 The letters PO in ‘.po’ files means Portable Object, to distinguish
1 it from ‘.mo’ files, where MO stands for Machine Object. This paradigm,
1 as well as the PO file format, is inspired by the NLS standard developed
1 by Uniforum, and first implemented by Sun in their Solaris system.
1
1 PO files are meant to be read and edited by humans, and associate
1 each original, translatable string of a given package with its
1 translation in a particular target language. A single PO file is
1 dedicated to a single target language. If a package supports many
1 languages, there is one such PO file per language supported, and each
1 package has its own set of PO files. These PO files are best created by
1 the ‘xgettext’ program, and later updated or refreshed through the
1 ‘msgmerge’ program. Program ‘xgettext’ extracts all marked messages
1 from a set of C files and initializes a PO file with empty translations.
1 Program ‘msgmerge’ takes care of adjusting PO files between releases of
1 the corresponding sources, commenting obsolete entries, initializing new
1 ones, and updating all source line references. Files ending with ‘.pot’
1 are kind of base translation files found in distributions, in PO file
1 format.
1
1 MO files are meant to be read by programs, and are binary in nature.
1 A few systems already offer tools for creating and handling MO files as
1 part of the Native Language Support coming with the system, but the
1 format of these MO files is often different from system to system, and
1 non-portable. The tools already provided with these systems don’t
1 support all the features of GNU ‘gettext’. Therefore GNU ‘gettext’ uses
1 its own format for MO files. Files ending with ‘.gmo’ are really MO
1 files, when it is known that these files use the GNU format.
1