Tools

msgfmt

msgfmt compiles PO text files into MO binary format for runtime use.

Usage:

msgfmt [OPTIONS] -o OUTPUT.mo INPUT.po [INPUT2.po ...]
msgfmt [OPTIONS] INPUT.po

Options

-o FILE, --output-file=FILE

Write output to FILE.

--no-hash

Don’t include a hash table in the .mo file. Lookups will use binary search instead (slightly slower, smaller file).

-f, --use-fuzzy

Include fuzzy translations in the output. By default, entries marked with #, fuzzy are excluded.

-c, --check

Perform all format string and header checks.

--statistics

Print counts of translated, fuzzy, and untranslated messages.

-v, --verbose

Print progress information.

-V, --version

Print version and exit.

-h, --help

Print usage help and exit.

Examples

Compile a single PO file:

msgfmt -o messages.mo messages.po

Merge multiple PO files:

msgfmt -o merged.mo base.po overrides.po

Compile without hash table (smaller output):

msgfmt --no-hash -o messages.mo messages.po