What is the PO file format?
.po files are GNU gettext Portable Object files - the human-editable source format for software translations. The format is used across a vast range of projects: GNU/Linux utilities, PHP applications, Python packages, WordPress themes and plugins, and many other open-source applications.
A .po file is plain UTF-8 text organized as paired entries: msgid (the original source-language string) and msgstr (the translated equivalent). Comment lines prefixed with # carry translator notes, extracted source-code comments, file references, and fuzzy flags. Entries with plural forms use msgid_plural and indexed msgstr[n] variants governed by a Plural-Forms expression in the file header.
The translation workflow follows three file types: developers extract translatable strings into a .pot template, translators copy it per locale and fill in the msgstr values, and then msgfmt compiles each .po into a binary .mo file that the application loads at runtime. The .mo is machine-readable only - you always edit the .po, never the compiled output.
.po files can be edited in a plain text editor, but dedicated tools like Poedit provide error checking, fuzzy-match suggestions, and plural-form helpers. Web platforms like Weblate support collaborative translation. The format is stable and backwards-compatible since GNU gettext was introduced in 1995.
Security & safety
RISK: LOWA .po holds only translation text and comments - there is no executable code, so the file itself is harmless. The only practical caution: a malicious translation file placed in a theme/plugin could inject misleading interface text (e.g. altered links or instructions), so use language files only from the official theme/plugin or translation source, not random 'translation' downloads.
Format details
in a nutshell- Disk image / partition image (rare) - The DB legacy name 'Disk image file' reflects a rare/incorrect labeling; .po is not a standard disk-image extension.
Programs that open PO files
Technical details
deep spec| Format type | Plain text, line-oriented (GNU gettext PO syntax) |
| Encoding | UTF-8 (charset declared in the header Content-Type field); legacy catalogs may use ISO-8859-x encodings |
| MIME type | text/x-gettext-translation |
| Entry structure | msgid / msgstr pairs; optional msgctxt for contextual disambiguation of identical source strings |
| Header entry | First entry has an empty msgid; its msgstr block carries Project-Id-Version, Content-Type, Plural-Forms, and other catalog metadata |
| Plural forms | msgid_plural with indexed msgstr[0], msgstr[1], ... variants; the Plural-Forms header expression controls which form applies for a given count |
| Comment types | # (translator comment), #. (extracted source comment), #: (source file reference), #, (flags such as fuzzy or c-format) |
| Fuzzy flag | #, fuzzy marks a translation needing review after the source string changed; msgfmt excludes fuzzy entries from the compiled .mo output |
| Compiled output | Converted to binary .mo (Machine Object) by msgfmt; the .mo is what the running application loads via gettext() |
| Template file | .pot (Portable Object Template) - the untranslated skeleton; all language .po files are derived from it via msginit or msgmerge |
| Typical file size | 5 KB - 5 MB; scales with the number of translatable strings in the project |
| Tool chain | xgettext (extract strings from source), msginit (create new .po), msgmerge (update existing .po), msgfmt (compile to .mo) |
| Platform | Any - Linux, macOS, Windows, BSD; wherever GNU gettext or a compatible libintl implementation is available |
| Ecosystem | Used by WordPress, Drupal, GNOME, KDE, Python gettext, PHP gettext, and many other frameworks for internationalization (i18n) |
| Released | 1995 (GNU gettext) |
| Latest version | PO file syntax is stable; defined in the current GNU gettext manual |
| Open standard | Yes · royalty-free |
| Specification | www.gnu.org |
PO conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about PO files.