info > msgfmt

πŸ“– NAME

msgfmt β€” generate binary message catalog from textual translation description

πŸš€ Quick Reference

Use CaseCommandDescription
🌍 Create standard .mo filemsgfmt -o output.mo input.poCompile a .po file into a binary .mo catalog
β˜• Generate Java ResourceBundle classmsgfmt -j --resource=Messages -l de_DE -d classes input.poCreate a compiled Java class for locale
#️⃣ Produce .NET .dllmsgfmt --csharp -r Messages -l fr -d bin input.poGenerate C# satellite assembly
πŸ–₯️ Generate .desktop filemsgfmt --desktop --template=app.desktop -l de -o app.de.desktop de.poCreate a localised .desktop entry
πŸ“„ Create XML translation filemsgfmt --xml --template=doc.xml -l es -o doc.es.xml es.poProduce localised XML document
πŸ” Validate translationsmsgfmt -c input.poCheck format strings, header, and domain consistency
πŸ“Š View translation statisticsmsgfmt --statistics -v input.poPrint number of translated, fuzzy, untranslated messages

πŸ“ SYNOPSIS

msgfmt [OPTION] FILENAME.po ...

πŸ“˜ DESCRIPTION

The msgfmt program generates a binary message catalog from a textual translation description.

πŸ“‚ Input file location

If an input file is -, standard input is read.

πŸ”§ Operation mode

πŸ“ Output file location

If the output FILE is -, output is written to standard output.

β˜• Output file location in Java mode

The class name is determined by appending the locale name to the resource name, separated with an underscore. The -d option is mandatory. The class is written under the specified directory.

#️⃣ Output file location in C# mode

The -l and -d options are mandatory. The .dll file is written in a subdirectory of the specified directory whose name depends on the locale.

🧩 Output file location in Tcl mode

The -l and -d options are mandatory. The .msg file is written in the specified directory.

πŸ–₯️ Desktop Entry mode operations

To generate a .desktop file for a single locale:

msgfmt --desktop --template=TEMPLATE --locale=LOCALE \
  -o FILE FILENAME.po ...

Bulk mode (process multiple .po files):

msgfmt --desktop --template=TEMPLATE -d DIRECTORY -o FILE

msgfmt first reads the LINGUAS file under DIRECTORY, then processes all .po files listed there. You can also limit the locales to a subset through the LINGUAS environment variable. For either operation mode, the -o and --template options are mandatory.

πŸ“„ XML mode operations

Single locale:

msgfmt --xml --template=TEMPLATE --locale=LOCALE \
  -o FILE FILENAME.po ...

Bulk mode:

msgfmt --xml --template=TEMPLATE -d DIRECTORY -o FILE

Same LINGUAS file processing as desktop mode. -o and --template are mandatory.

πŸ“ Input file syntax

πŸ” Input file interpretation

πŸ“€ Output details

ℹ️ Informative output

msgfmt
πŸ“– NAME πŸš€ Quick Reference πŸ“ SYNOPSIS πŸ“˜ DESCRIPTION
πŸ“‚ Input file location πŸ”§ Operation mode πŸ“ Output file location β˜• Output file location in Java mode #️⃣ Output file location in C# mode 🧩 Output file location in Tcl mode πŸ–₯️ Desktop Entry mode operations πŸ“„ XML mode operations πŸ“ Input file syntax πŸ” Input file interpretation πŸ“€ Output details ℹ️ Informative output

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-31 04:54 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^