msgfmt(1) create a message object from a message file


msgfmt [ -v ] filename.po ...


msgfmt creates a message object filename .mo file from the portable message file filename.po.

The .po file contains strings extracted from source code. .po files can be edited, and the messages in them can changed to accomodate any language supported by the system.

The xgettext command (see xgettext(1)) can be used to create the default.po file.

The msgfmt command does not modify the portable object files.


Verbose. List duplicate message identifiers. Message strings are not redefined.


The following command creates a named .mo file for each domain named in the portable message objects filename1.po and filename2.po.

msgfmt filename1.po filename2.po

Running msgfmt(1) on the following sample .po file creates two .mo files, named and

domain ""
msgid "aao"
msgstr "first sample message"
domain ""
msgid "bbo"
msgstr "second sample message"