How to Translate PO and POT files?
If you’re localizing WordPress sites, Python or PHP applications, GNOME or KDE software, or any project built on the gettext ecosystem, PO is the format you’ll be working in. After all, it’s the longest-running standard in software localization.
Translating PO files is actually fairly simple. You just need a tool that understands the format. This guide explains:
- How PO and POT files work
- How to translate PO files safely
- How to choose the right PO file translator
- Which workflows work best for different projects
PO vs POT vs MO: What You’re Actually Dealing With
If you’re new to gettext localization, PO, POT, and MO files are difficult to distinguish at first. Their names are similar, which makes them easy to confuse. But each file has a specific purpose.
| File type | What it actually is | Purpose | When is it used? | Should you edit it? | Key things to remember |
|---|---|---|---|---|---|
| POT | POT is the untranslated template with source strings only | Defines which strings need translation | Created when developers extract translatable text from the application | No | It’s the starting blueprint, not the place where translation happens. |
| PO | PO is a per-language copy of the template, where translation actually happens. | Stores translations for one language | Used during the actual translation process | Yes | This is the file translators work on. Every language gets its own PO file. |
| MO | MO is the compiled binary that the app loads at runtime. | Let the app load translations efficiently | Generated after translation is complete | No | Humans read PO files. Applications read MO file |
How To Translate PO Files

Stage 1: Extract strings with xgettext
To start, run xgettext in the CLI, which scans your source code and pulls out every string marked for translation (anything wrapped in _(), gettext(), or ngettext()).
After that, it writes them all into a POT file, with every msgid populated and every msgstr blank.
Here I am writing the command to extract strings into the messages.pot file:
1 | xgettext --language=Python --keyword=_ --keyword=ngettext:1,2 --output=locale/messages.pot 'src/**/*.py' |
Stage 2: Create a language file with msginit
msginit takes the POT template and creates a PO file for a specific locale; say, fr_FR for French, or ar for Arabic. It can automatically write the correct headers: language code, encoding, and plural form rules. Arabic needs 6 plural forms; French needs 2:
1 | msginit --input=locale/messages.pot --locale=fr_FR --output=locale/fr_FR/LC_MESSAGES/messages.po |
Stage 3: Translate the strings
Open the PO file in any text editor and fill in the msgstr fields:
1 | msgid "Save document" |
How To Translate & Edit PO Files With Poedit

Poedit is a dedicated desktop editor for PO, XLIFF, JSON, Qt, and Flutter files, used by developers, localization managers, and translators to maintain multilingual apps, websites, and WordPress plugins without breaking file syntax or losing string context. It gives them a purpose-built interface with translation memory, pre-translation, plural form handling, and built-in QA checks.
Step 1: Open the POT or PO file
Start by opening the translation file inside Poedit. If you have a source file (no POT file yet), Poedit can help you extract the strings. If you have a POT file, Poedit can create a separate PO file for you for each language you want to translate into.

Since I already have a PO file called “restaurant-plugin.po”, let’s open it:

Choose your language and Poedit applies all of the plural rules for you:

Step 2: Translate string by string
Poedit shows Source text on one side and Translation field on the other. You only have to start translating without worrying about the complex syntax:

Step 3: Use translation memory and advanced pre-translation
Of course, Poedit comes with translation memory. Every string you finalize in Poedit gets stored in a local translation memory so that the next time a matching string appears, Poedit surfaces it as a suggestion automatically.

Step 4: Save the file
After translating the strings, save the file normally through the editor. Poedit also generates the compiled MO file automatically when saving a PO file.

Poedit’s advanced pre-translation can process entire files using translation memory and supported machine translation services. Poedit Pro can also use community-contributed translation memory and share yours to improve future translations.
Poedit is the most widely used desktop translation editor available for Windows, Mac, and Linux. Its tight integration with WordPress, the world’s most popular CMS, has made it nearly ubiquitous among web developers and translators.

How To Translate Your PO File With A Browser-Based Tool?
Browser-based translation tools can be a decent alternative to Poedit too. You simply drop a PO file into that online tool, which parses the source text for you to translate string-by-string.

This approach is entirely browser-based and requires no setup.
More Software For PO File Translation and Editing
1. Loco Translate

If you need a translation management plugin built directly into WordPress, Loco Translate is a solid choice too. With a native PO editor, automatic MO compilation, and string scanning all built in, translators can manage localization without ever leaving the WordPress dashboard. It’s especially convenient for quick fixes or last-minute edits before launch.
- Features: PO and POT file editing, MO auto-compilation, string scanning, locale management, built-in WordPress workflow, no external account required
- What makes it stand out: The only tool on this list that lives entirely inside WordPress, with no external accounts needed. For non-technical users managing a WordPress site, it’s the lowest-friction path to getting translations done.
2. Crowdin

If you’re looking for a full cloud-based localization platform, Crowdin is a good option. With translation memory, machine translation, and CI/CD integrations all built in, translators can easily collaborate with the dev team. The open-source plan supports public repositories at no cost, which makes it a popular choice for open-source frontend projects.
You can integrate Poedit with Crowdin to get the best of both worlds: the translation editor features from Poedit and the cloud collaboration features of Crowdin. Please read more about PO file translation with Crowdin here.
- Features: PO and POT file support, translation memory, machine translation (DeepL, Google, Microsoft, OpenAI), Git integrations, in-context editor, screenshot localization, QA checks, glossary, crowdsourced translation support, REST API, webhooks, iOS and Android SDK integrations
- What makes it stand out: The most mature open-source and community translation support of any TMS on this list, combined with a deep integration library that covers practically every repo, CMS, and design tool a software team might already be using
Website: Crowdin