Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: 25 July 1990 (ubuntu - 07/07/09)

Section: 1 (Commandes utilisateur)


msgfmt - 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.

Portable Object Files

Each .po file contains one or more lines. Each line contains either a comment or a statement. Comments start the line with a hash mark (#) and end with the newline character and are ignored.

Each directive starts on a new line and is separated from <value> by white space (such as one or more space or tab characters). <value> consists of one or more quoted strings separated by white space or <CR>. The following are valid directives:

domain domainname
msgid message_identifier
msgstr message_string

The domain directive identifies all following directives until another domain directive is encountered as applying to the domain domainname. The domainname is a string up to MAXDOMAIN bytes long, and can contain any characters allowed in legal filenames. Until the first domain directive is encountered in the file, all target strings belong to the default domain. The default domain is called default.

The msgid directive specifies the message identifier for the following msgstr directive. The message_identifier string identifies a target string at retrieval time. Every statement containing a msgid directive must be followed by a statement containing a msgstr directive.

The msgstr directive specifies the target string associated with the message_identifier string declared in the immediately preceding msgid directive.


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"


xgettext(1), gettext(3).
TN: Hahahahahah ! Ma copine aussi est utilisable sous Linux ;-)
ST: C'est quelle version , ta copine ? TN: Beta 1 ;-)))
JP: C'est quel type de license ?
-+- TN in Guide du linuxien pervers : "pas le rouleau à patisserie !" -+-