How to Convert PO to MO with msgfmt (and Why You Need To)

Compile gettext PO files to binary MO with msgfmt — the step that makes your translations actually load at runtime. Step-by-step: the basic msgfmt command, the LC_MESSAGES directory layout apps expect, validating with -c, reading --statistics, why fuzzy entries are skipped, compiling a whole tree in one loop, and how Django compilemessages and Flask pybabel wrap msgfmt for you.

Back to the PO-File blog