Localization

How to Translate a PO File: A Step-by-Step Guide

What a .po file is, how to translate one without breaking placeholders or plurals, and how to get it done in minutes with AI or a professional translator.

Format: Gettext PO (.po) • Updated: October 21, 2026

To translate a PO file, you fill in the empty msgstr line under every msgid, leave everything else alone, and save the file under the target language. You can do that by hand in a text or PO editor, send it to a translator, or upload it to a translation tool that understands the format. This guide covers what’s inside a PO file, the mistakes that break one, and the fastest way to get it translated.

What Is a PO File?

A PO file (Portable Object) holds the text of a piece of software for one language. It’s the standard format of GNU gettext, used by WordPress themes and plugins, Django, Python, PHP and many Linux apps. Every entry pairs the original text with its translation:

#: templates/cart.html:12
msgid "Your cart is empty"
msgstr ""

msgid "Hello, %(name)s!"
msgstr ""

msgid is the source text and must never change, because the software looks the translation up by it. msgstr is where the translation goes. Lines starting with # are comments and references for the translator.

You’ll often meet two relatives. A .pot file is the empty template a developer generates from the code, which you copy to a .po file for each language. A .mo file is the compiled version the software actually reads, produced from the finished .po.

How to Translate a PO File, Step by Step

  1. Get the right file. If you have a .pot template, create a .po file for your language from it (gettext’s msginit does this, and so do most PO editors).
  2. Translate every msgstr. Fill in the empty lines, keep each msgid exactly as it is, and copy placeholders like %s or {name} into the translation unchanged.
  3. Check the result. Run msgfmt --check on the file, or open it in a PO editor, to catch broken placeholders and syntax errors.
  4. Compile and test. Turn the .po into a .mo file (msgfmt again, or your framework’s own command), then open the app in the new language and click through it.

Doing step 2 by hand is fine for a few dozen strings. For a few thousand, or for ten languages, it’s where a translation tool earns its keep.

Mistakes That Break a Translated PO File

  • Translating placeholders. %s, %d, %(name)s and {count} are filled in by the software. Translate or delete one and the app shows a raw code, or crashes.
  • Editing the msgid. Change a single character and the software no longer finds the translation, so it falls back to the original language.
  • Ignoring plural forms. Entries with msgid_plural need one msgstr[n] line per plural form of the target language. English has two, Polish has three, Arabic has six, and the Plural-Forms line in the header says how many.
  • Breaking the encoding. Save the file as UTF-8 and keep the charset in the header in line with it, or accented letters turn into question marks.
  • Forgetting to compile. The app reads the .mo file, not the .po. Until you compile, nothing changes on screen.

How to Translate a PO File with Taia

Taia is an online translation platform that reads PO files directly, so you don’t copy strings in and out of a chat window.

  1. Upload the .po file at translate.taia.io and pick your target languages.
  2. Choose AI or a professional translator. AI translates the empty entries in minutes. A professional linguist reviews and edits them when the text is customer-facing.
  3. Download the translated .po file, then compile and test it as usual.

What it takes care of for you:

  • Placeholders are locked. %s, %d, %(name)s, %1$s, {name}, {{name}} and ${name} show up as protected tags that can be moved but not altered, so they come back exactly as written.
  • Your file stays your file. The header, comments, references and order of entries are kept, because the translations are written into your original catalog.
  • Existing translations aren’t touched. Entries that already have a msgstr are kept as they are and aren’t translated again.
  • Your terminology carries over. On Pro, a glossary and translation memory keep product names and recurring phrases consistent from one release to the next.

One honest limit: Taia doesn’t write plural forms (msgid_plural) back into the file yet. Plural entries come back as they were in your catalog, and they still use credits, so fill those few in by hand before you compile.

How Much Does It Cost?

PO files are part of the Pro plan, €39/month for 100,000 credits (100,000 words with Standard AI), and of Enterprise. If you’d rather have a person do it, professional translation is billed per word from €0.06, with no subscription. Taia handles 65+ formats, from JSON to XLIFF, in 204 languages.

When Your PO Files Change Every Release

You can re-upload the updated catalog: entries that already have a translation are kept, so only the empty ones are translated. If a source text changed, clear its old translation first so it’s translated again. If you’d rather not pass files around at all, the next step is continuous localization, where new and changed strings flow to translation on their own and come back translated. That’s what we’re building Strings for.

With Strings, a command line tool will push new and changed strings from your repository or CI pipeline to Taia and pull approved translations back, so only approved translations reach your build. PO is one of the string file formats we’re working on, alongside JSON, iOS and Android files. Strings isn’t public yet: join the Strings waitlist for early access by invitation.

Frequently Asked Questions

Can I translate a PO file with Google Translate?

Not as a file. Google Translate’s document upload takes office formats like Word and PDF, not .po, so you’d have to paste strings in one at a time and put them back by hand, with nothing stopping it from translating your placeholders. A tool that reads the PO format keeps the structure and the placeholders safe.

What’s the difference between PO, POT and MO files?

A .pot file is the empty template generated from the source code. A .po file is a copy of it for one language, where the translations go. A .mo file is the compiled, binary version of a finished .po that the software loads.

Do I need to compile the PO file after translating it?

Yes, in most setups. Gettext-based apps read the .mo file, so run msgfmt or your framework’s compile command (in Django, compilemessages) after translating. Some tools, such as many WordPress plugins, do it for you.

Should I translate the placeholders in a PO file?

No. Keep placeholders like %s, %d, %(name)s and {name} exactly as they are. You can move them to suit the word order of your language, but the characters have to stay the same.

How do I translate a WordPress PO file?

The same way as any other: download the plugin’s or theme’s .po (or .pot) file, translate it, and upload the .po and the compiled .mo back to its languages folder, or let a translation plugin load them for you.

What if my PO files change with every release?

Re-upload the updated catalog: entries that already have a translation are kept, so only the empty ones are translated. If a source text changed, clear its old translation first. If you’d rather automate it, Strings, Taia’s upcoming continuous localization product, is meant for exactly that: new and changed strings will go to Taia from your repository or CI pipeline, and approved translations will come back. It isn’t public yet, but you can join the Strings waitlist for early access.

How much does it cost to translate a PO file?

With Taia, PO files are on the Pro plan, €39/month for 100,000 credits (100,000 words with Standard AI). Professional translation is billed per word from €0.06, with no subscription.

Ready to Translate Your Gettext PO Files?

Upload your file and get a formatted translation in minutes

5,000 credits free (5,000 words with Standard AI) • No credit card required