{
    "mode": "info",
    "parameter": "msgen",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/msgen/json",
    "generated": "2026-07-30T20:31:55Z",
    "sections": {
        "File: gettext.info,  Node: msgen Invocation,  Next: msgexec Invocation,  Prev: msgattrib Invocation,  Up: Manipulating": {
            "content": "",
            "subsections": [
                {
                    "name": "9.9 Invoking the 'msgen' Program",
                    "content": "msgen [OPTION] INPUTFILE\n\nThe 'msgen' program creates an English translation catalog.  The\ninput file is the last created English PO file, or a PO Template file\n(generally created by xgettext).  Untranslated entries are assigned a\ntranslation that is identical to the msgid.\n\nNote: 'msginit --no-translator --locale=en' performs a very similar\ntask.  The main difference is that 'msginit' cares specially about the\nheader entry, whereas 'msgen' doesn't.\n\n\n'INPUTFILE'\nInput PO or POT file.\n\n'-D DIRECTORY'\n'--directory=DIRECTORY'\nAdd DIRECTORY to the list of directories.  Source files are\nsearched relative to this list of directories.  The resulting '.po'\nfile will be written relative to the current directory, though.\n\nIf INPUTFILE is '-', standard input is read.\n\n\n'-o FILE'\n'--output-file=FILE'\nWrite output to specified file.\n\nThe results are written to standard output if no output file is\nspecified or if it is '-'.\n\n\n'-P'\n'--properties-input'\nAssume the input file is a Java ResourceBundle in Java\n'.properties' syntax, not in PO file syntax.\n\n'--stringtable-input'\nAssume the input file is a NeXTstep/GNUstep localized resource file\nin '.strings' syntax, not in PO file syntax.\n\n\n'--lang=CATALOGNAME'\nSpecify the 'Language' field to be used in the header entry.  See\n*note Header Entry:: for the meaning of this field.  Note: The\n'Language-Team' and 'Plural-Forms' fields are not set by this\noption.\n\n'--color'\n'--color=WHEN'\nSpecify whether or when to use colors and other text attributes.\nSee *note The --color option:: for details.\n\n'--style=STYLEFILE'\nSpecify the CSS style rule file to use for '--color'.  See *note\nThe --style option:: for details.\n\n'--force-po'\nAlways write an output file even if it contains no message.\n\n'-i'\n'--indent'\nWrite the .po file using indented style.\n\n'--no-location'\nDo not write '#: FILENAME:LINE' lines.\n\n'-n'\n'--add-location=TYPE'\nGenerate '#: FILENAME:LINE' lines (default).\n\nThe optional TYPE can be either 'full', 'file', or 'never'.  If it\nis not given or 'full', it generates the lines with both file name\nand line number.  If it is 'file', the line number part is omitted.\nIf it is 'never', it completely suppresses the lines (same as\n'--no-location').\n\n'--strict'\nWrite out a strict Uniforum conforming PO file.  Note that this\nUniforum format should be avoided because it doesn't support the\nGNU extensions.\n\n'-p'\n'--properties-output'\nWrite out a Java ResourceBundle in Java '.properties' syntax.  Note\nthat this file format doesn't support plural forms and silently\ndrops obsolete messages.\n\n'--stringtable-output'\nWrite out a NeXTstep/GNUstep localized resource file in '.strings'\nsyntax.  Note that this file format doesn't support plural forms.\n\n'-w NUMBER'\n'--width=NUMBER'\nSet the output page width.  Long strings in the output files will\nbe split across multiple lines in order to ensure that each line's\nwidth (= number of screen columns) is less or equal to the given\nNUMBER.\n\n'--no-wrap'\nDo not break long message lines.  Message lines whose width exceeds\nthe output page width will not be split into several lines.  Only\nfile reference lines which are wider than the output page width\nwill be split.\n\n'-s'\n'--sort-output'\nGenerate sorted output.  Note that using this option makes it much\nharder for the translator to understand each message's context.\n\n'-F'\n'--sort-by-file'\nSort output by file location.\n\n\n'-h'\n'--help'\nDisplay this help and exit.\n\n'-V'\n'--version'\nOutput version information and exit.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}