msgen â create an English translation catalog
| Use Case | Command | Description |
|---|---|---|
| đ Create English catalog from PO file | msgen input.po -o output.po | Creates English translation catalog from input PO file |
| đĨ Read from stdin, write to stdout | msgen - | Read standard input, output to standard output |
| đ Use Java properties input | msgen -P input.properties -o output.po | Assume input is Java ResourceBundle .properties syntax |
| đ Use NeXTstep strings input | msgen --stringtable-input input.strings -o output.po | Assume input is NeXTstep/GNUstep .strings syntax |
| đ Set language in header | msgen input.po --lang=fr -o output.po | Specify Language field in header entry |
| đ¨ Output with color | msgen input.po --color -o output.po | Use colors and other text attributes in output |
| đ Sort output by file location | msgen input.po -F -o output.po | Sort output by file location |
msgen [OPTION] INPUTFILE
The msgen program creates an English translation catalog. The input file is the last created English PO file, or a PO Template file (generally created by xgettext). Untranslated entries are assigned a translation that is identical to the msgid.
đĄ Note: msginit --no-translator --locale=en performs a very similar task. The main difference is that msginit cares specially about the header entry, whereas msgen doesn't.
INPUTFILE â Input PO or POT file.-D DIRECTORY / --directory=DIRECTORY â đ Add DIRECTORY to the list of directories. Source files are searched relative to this list of directories. The resulting .po file will be written relative to the current directory, though.If INPUTFILE is '-', standard input is read.
-o FILE / --output-file=FILE â đ Write output to specified file.The results are written to standard output if no output file is specified or if it is '-'.
-P / --properties-input â Assume the input file is a Java ResourceBundle in Java .properties syntax, not in PO file syntax.--stringtable-input â Assume the input file is a NeXTstep/GNUstep localized resource file in .strings syntax, not in PO file syntax.--lang=CATALOGNAME â đ Specify the Language field to be used in the header entry. See Header Entry for the meaning of this field. Note: The Language-Team and Plural-Forms fields are not set by this option.--color / --color=WHEN â đ¨ Specify whether or when to use colors and other text attributes. See The --color option for details.--style=STYLE_FILE â đ Specify the CSS style rule file to use for --color. See The --style option for details.--force-po â đĒ Always write an output file even if it contains no message.-i / --indent â đ Write the .po file using indented style.--no-location â Do not write #: FILENAME:LINE lines.-n / --add-location=TYPE â đ Generate #: FILENAME:LINE lines (default). The optional TYPE can be either full, file, or never. If it is not given or full, it generates the lines with both file name and line number. If it is file, the line number part is omitted. If it is never, it completely suppresses the lines (same as --no-location).--strict â đ Write out a strict Uniforum conforming PO file. Note that this Uniforum format should be avoided because it doesn't support the GNU extensions.-p / --properties-output â â Write out a Java ResourceBundle in Java .properties syntax. Note that this file format doesn't support plural forms and silently drops obsolete messages.--stringtable-output â đ Write out a NeXTstep/GNUstep localized resource file in .strings syntax. Note that this file format doesn't support plural forms.-w NUMBER / --width=NUMBER â âī¸ Set the output page width. Long strings in the output files will be split across multiple lines in order to ensure that each line's width (= number of screen columns) is less or equal to the given NUMBER.--no-wrap â đĢ Do not break long message lines. Message lines whose width exceeds the output page width will not be split into several lines. Only file reference lines which are wider than the output page width will be split.-s / --sort-output â đ Generate sorted output. Note that using this option makes it much harder for the translator to understand each message's context.-F / --sort-by-file â đ Sort output by file location.-h / --help â â Display this help and exit.-V / --version â âšī¸ Output version information and exit.Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 08:48 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format