Name

msgfmt

Synopsis

    msgfmt [options]pofiles

Solaris and GNU/Linux only. msgfmt translates “portable object files” (.po files) into loadable message files that can be used by a running application via the gettext (3C) and dgettext (3C) library functions.

Portable object files are created using xgettext from the original C source code files. A translator then edits the .po file, providing translations of each string (or “message”) in the source program. The format is described in the msgfmt (1) manpage.

Once compiled by msgfmt, the running program uses the translations for its output when the locale is set up appropriately.

The Solaris version of this command has picked up some features from the GNU version; see gettext for more discussion of this fact and for a URL reference. The Solaris version can create both Solaris format output files and GNU format output files.

Common Options

-Ddir, --directory=dir

Add dir to the list of directories searched for input files.

-f, --use-fuzzy

Place fuzzy entries in the output.

-ofile, --output=file

Place the output in file. This option ignores domain directives and duplicate msgids.

--strict

Enable strict Uniforum compliance: append the .mo suffix if not already present. The Solaris version ignores this option for Solaris output format files.

-v, --verbose

Be verbose. Duplicate message identifiers are listed, but message strings are not redefined.

Solaris Options

-g

Generate GNU format output files. Mutually exclusive with -s.

-s

Generate Solaris format output ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.