Gettext PO file translation without broken placeholders or plurals

Translate PO files online: upload a gettext .po or .pot file, translate it with AI and your own reviewers, and export a build-ready PO file for every language.

Variables like %s and {name} become locked tags, plural forms and context markers stay intact, and with the Serge.io PO parser a re-upload reprocesses only the strings that changed.

Translate any file. In seconds.
Images, docs, video, audio, courses — pick a format and drop your file.
Drop documents here
or browse files · Supports .docx, .pdf, .pptx, .xlsx and more
From
To

Translate

More than 80 of the world’s largest companies have chosen Smartcat

What is a gettext PO file?

A PO (Portable Object) file is the plain-text translation file used by GNU gettext, the internationalization system behind Python, PHP, WordPress, Django and Drupal projects. In the PO file format, each entry pairs a source string (msgid) with its translation (msgstr), so one PO file holds one language.

Your code produces a POT template, each language gets a PO file built from it, and your build compiles every PO file into the binary MO file the application loads. Smartcat’s software localization platform translates PO and POT files as bilingual files: msgid comes in as the source and the translation goes back into msgstr.

  • .po: one language, source and translation side by side

  • .pot: the empty template extracted from your source code

  • .mo: the compiled binary your application actually loads

3

PO parsers

Default PO, Serge.io PO and Monolingual PO: pick the one that matches how your files are built.

92%

accepted without edits

92% of words translated by Smartcat AI are accepted without a single human edit.

280+

languages

Translate one PO file into 280+ languages in the same project.

#. Shown when the cart is empty
#: src/cart.py:42
msgctxt "cart"
msgid "Your cart is empty"
msgstr "Votre panier est vide"

#: src/cart.py:57
msgid "%d item in your cart"
msgid_plural "%d items in your cart"
msgstr[0] "%d article dans votre panier"
msgstr[1] "%d articles dans votre panier"

#: src/account.py:12
msgid "Hello, {name}!"
msgstr "Bonjour, {name} !"
PO file example: an annotated French .po file, showing what Smartcat translates, locks and shows as context.
  • msgstr: translated

    Smartcat writes each approved translation into msgstr, one value per plural form.

  • %d and {name}: locked tags

    %d and {name} import as protected tags that translators can move but can’t alter or delete.

  • #. comments: translator context

    The #. comment shows next to the segment in the editor. The #: reference is the string ID the Serge.io parser keys on.

  • msgid and msgctxt: kept as is

    msgid, msgctxt and msgid_plural stay exactly as they are in your file.

Why do PO files break in generic translation tools?

PO files break in generic translation tools because those tools see text, not gettext entries. They let translators edit variables like %d, drop review history on every re-import and ship unreviewed msgstr values. Smartcat works on the PO file itself, so each failure has a fix inside the file.

Before: strings handled outside the file

× every language× every release

With Smartcat: the PO file itself

Every language at once

Strings copied out by hand

msgid text goes into a generic translator without the file around it.

Upload the .po or .pot file

Smartcat reads the entries as source and target, one bilingual file per language.

Variables get edited

A translator changes %d or {name}; the export passes review and fails at runtime.

Placeholders become locked tags

%s, %d, {name} and {0} can move but can’t be altered or deleted.

Every release wipes history

Re-importing the whole file deletes review comments and bills strings that never changed.

Re-imports keyed by string ID

With the Serge.io PO parser only changed segments are reprocessed and billed.

Machine output with no sign-off

msgstr values nobody validated, in languages nobody on the team reads.

AI drafts, people approve

Your reviewers or marketplace linguists confirm each segment in the same editor.

Gettext PO support: Smartcat vs Phrase, Crowdin and Lokalise

Smartcat, Phrase, Crowdin and Lokalise all import gettext PO files. They differ on the second upload: Smartcat lets you pick the PO parser per file, keeps review history when entries carry string IDs, and bills only the strings that changed.

CapabilitySmartcatPhraseCrowdinLokalise
PO / POT import and export✓ .po and .pot processed as bilingual files; translated msgstr written back on export✓ Documented (.po, .pot and .mo)✓ Documented✓ Documented
Parser choice per file✓ Three parsers: Default PO, Serge.io PO, Monolingual PO~ Import format options~ Not documented~ Not documented
Re-imports keyed by string ID✓ Serge.io PO parser: only changed segments are reprocessed; comments and history survive~ Not documented~ Not documented~ Not documented
Pay only for changed strings on re-upload✓ Unchanged segments use no Smartwords~ Not documented~ Not documented~ Not documented
Placeholder protection (%s, %d, {name})✓ Preset-based locked tags translators can’t alter or delete✓ Documented✓ Documented, with auto-detection and validation✓ Documented
Plural forms (msgid_plural)✓ Supported✓ Documented✓ Documented✓ Documented; plural headers added manually per their docs
Context markers (msgctxt)✓ Supported✓ Documented, as a key prefix✓ Documented✓ Documented
Built-in marketplace of professional linguists✓ Vetted linguists review in the same workflow✗ Not offered~ Vendor directory✗ Not offered
Pricing modelUsage-based SmartwordsPer-seat plansPlan tiersPer-seat plans

Cells for Phrase, Crowdin and Lokalise reflect what each vendor’s own public documentation describes, as of August 2026. ✓ documented or supported · ~ partial or not documented · ✗ not offered. All product names are trademarks of their respective owners; see the trademark notice under the FAQ.

How to translate a PO file in Smartcat

To translate a PO file, create a Smartcat project with your target languages, upload the .po or .pot file, let AI draft every entry, review it in the editor and export a translated PO file per language. The full options reference is in the help center: Translating PO files in Smartcat.

  1. Create a project and add your languages

    Open a project in Smartcat and pick every target language your app ships in.

    Projects list in Smartcat with project status and progress
  2. Upload the .po or .pot file

    Smartcat detects the format and opens PO settings: the parser (Serge.io PO for files with string IDs), placeholder protection and HTML tag protection.

    An uploaded PO file split into segments, each with its own context, in Smartcat
  3. Let AI draft every segment

    AI translates every entry using your translation memory and glossary, including each plural form.

    Per-language progress of an automatic PO file translation in Smartcat: AI translation at 100%, post-editing still to do
  4. Review in the editor

    Your own reviewers or linguists hired from the Smartcat Marketplace edit and confirm segments, with QA checks running as they work.

    Translated segments in the Smartcat editor with match scores and reviewer avatars
  5. Export a PO file per language

    Smartcat writes the translations back into msgstr and returns a valid PO file per language, ready to compile with msgfmt.

    Import and Export buttons on a Smartcat project page, used to download the translated PO files
“

This was one of our first AI investments. What used to take weeks now takes minutes. It saves us a healthy six figures a year in translation costs, without sacrificing quality.

”

Ollie Scheers

Chief Technology Officer, Huel

See your own PO files translated with every placeholder intact

PO file translation software for product teams

Smartcat’s PO file translation software keeps a translated file buildable in three ways: each msgid maps cleanly to its msgstr, variables stay locked as tags, and translators see the developer comment behind every string.

How msgid and msgstr map in a translated PO file

Smartcat processes PO files as bilingual files. The msgid imports as the source segment and the msgstr, if present, imports as the target.

On export, every msgstr is updated with the translation from the editor and you get a valid PO file back, one per language, ready for your build. Import and export options are in the help center: Translating PO files in Smartcat.

How PO placeholders (%s, %d, {name}) stay locked

Turn on placeholder import and Smartcat converts %s, %d, {name} and {0} into protected tags, following your workspace’s placeholder preset.

Translators can move them, but they can’t alter or delete them, so a corrupted variable never reaches your build. The JSON translator locks placeholders in locale files the same way.

How #. developer comments reach translators

The comment above each string, the #. line your extraction tool writes, is imported as a segment comment in the editor.

Translators see “Shown when the cart is empty” next to the string itself, instead of guessing from a bare sentence fragment. The XML translator brings XML comments into the editor the same way.

See a PO file go from upload to export in your own workspace

How Smartcat handles PO parsers, plurals and context

Smartcat handles PO files with three parsers, native msgid_plural and msgctxt support, and placeholders and HTML locked as tags. Everything runs on the PO file itself, with no export–import loop between separate tools.

Choose the PO parser that fits your files

Smartcat lets you choose the parser per file, which decides how updates, history and cost behave.

Serge.io PO

Recommended for continuous localization. It keys segments by the unique string IDs in your #: comments, so a re-upload reprocesses only segments whose source changed.

  • Revisions and comments survive updates
  • Unchanged strings use no Smartwords
  • Duplicate IDs stop the upload with an error

Default PO

For one-off files without string IDs. It handles any valid PO file, but a re-upload replaces the document.

Revisions and comments on that document are removed on re-upload.

Monolingual PO

For a narrow set of pipelines. It imports only the target strings (msgstr), without the source text in the editor.

Most teams should never select it.

PO file format details: plural forms, context and placeholders

The parts of a PO entry that generic translators break, and how Smartcat keeps them.

Plural forms (msgid_plural)

Supported. Smartcat imports entries with msgid_plural and their msgstr[n] variants, so each plural form of a string gets its own translation.

  • msgid_plural
    The plural source string
  • msgstr[0]msgstr[1]
    One translation per plural form

Context markers (msgctxt)

Supported. Two entries with the same msgid but a different msgctxt stay separate segments with separate translations.

  • msgctxt "button"
    “Open” as a verb on a button
  • msgctxt "status"
    “Open” as a status label

POT file translation and plural forms by language

Upload a .pot template and Smartcat translates it into any project language, returning a PO file for each one. Languages need different numbers of plural forms: English and French use two msgstr forms, Polish and Russian three, Arabic six, and each form gets its own translation.

  • frmsgstr[0]msgstr[1]
    Two forms
  • plmsgstr[0]msgstr[1]msgstr[2]
    Three forms
  • armsgstr[0] … msgstr[5]
    Six forms

Check the Plural-Forms line in each exported file before you compile it with msgfmt.

HTML tags inside strings

Smartcat keeps HTML placeholders intact: turn on Protect HTML tags and markup such as <b> or <a href> becomes locked tags in the editor instead of editable text.

Locked as tags

<b><a href><br>

Existing translations

Import the msgstr values already in the file, leave them as unconfirmed drafts, confirm them at a chosen workflow stage, or lock them against editing.

ImportKeep as draftsConfirm at a stageLock

Language routing

Translate into your project’s languages, or let each file’s own Language: header decide its target.

  • Language: de
    The file goes to German

What to know before you upload

Check these against your own pipeline before you commit to a continuous workflow.

Serge.io needs unique string IDs

Every entry needs a unique ID in its #: comment. If your extraction step doesn’t write reference comments yet, enable it in your build first. A duplicate ID fails the upload, so fix it in the source and upload again.

No string IDs means no incremental updates

Files without IDs use the default parser, which replaces the whole document on re-upload and drops that document’s revisions and comments.

Segments follow your entries

PO uploads don’t offer the segmentation settings other formats have. Each segment follows an entry in your file.

What runs on every PO file you upload

Translation memory and glossary

Every approved string goes into a shared memory, and your glossary keeps UI terms consistent, so “Sign in” doesn’t become three different verbs in one interface.

  • Translation memory
  • Glossaries and termbases
  • Concordance search
  • Automated QA checks

Automatic PO file translation with human sign-off

Smartcat auto-translates every PO entry with AI; your team or vetted linguists from the Smartcat Marketplace then review it in the same editor, and the memory learns from each correction.

  1. AI draftsEvery segment
  2. People reviewYour team or marketplace linguists
  3. You exportA PO file per language

PO alongside the rest of your stack

The same workspace handles JSON, XML (also keyed by string ID), XLIFF and the documents your other teams send, so software strings and everything else share one memory and one glossary.

The AI coworkers that translate and check your PO files

Each coworker handles one step of PO file translation, from the first draft to the final check. Your reviewers approve every language before export.

Integrations for PO file translation: Git, CLI, API and CMS

Upload PO files in the web app or through the Smartcat REST API, or run continuous localization with the Serge.io PO parser. Key-collection sync through Git and the CLI covers JSON, YAML, Android XML and iOS .strings. See all integrations

Software localization results: how Kaseya and Huel ship every language

Kaseya syncs UI strings from GitHub into Smartcat and launches in 10+ languages on day one. Huel runs its web, CRM and ad localization on Smartcat. Each number below names the case study it comes from.

70%

lower localization costs

Kaseya cut localization costs by 70% and reinvested the savings in 8+ more languages. Source: Kaseya case study.

10+

languages from day one

UI strings sync from GitHub to Smartcat, so Kaseya launches in 10+ languages on day one. Source: Kaseya case study.

21

weeks of manual work saved a year

Huel eliminated 21 weeks of manual localization work per year, nearly half an FTE. Source: Huel case study.

“We’re launching globally on day one. We’re not waiting for English to go first and localizing later. Everything is ready at the same time.”
Ellen Kelly
Ellen KellyDirector of Product Documentation, Kaseya

See your PO files translated for your next release

What product and localization teams say on G2

What developers ask before they move PO files to Smartcat

Developers ask four things before moving PO files to Smartcat: what happens to the agency they already use, whether placeholders survive, what a re-upload costs, and whether Smartcat outputs .mo files.

“We already pay an agency for translations.”

Keep the linguists you trust: bring them into Smartcat as reviewers, or hire vetted linguists from the Smartcat Marketplace. AI drafts every PO entry first, so people review instead of translating from scratch.

  1. AI draftsEvery PO entry
  2. Your linguists reviewAgency or Marketplace
  3. You exportA PO file per language

“Translators will break our placeholders.”

They can’t. %s, %d, {name} and {0} become locked tags they can move but not edit or delete, and each one is restored exactly on export.

Locked as tags

%s%d{name}{0}

“We re-upload the same file every sprint.”

Use the Serge.io PO parser. Only segments whose source changed are reprocessed and billed, and review history stays on everything else.

  • Comments and revisions kept
  • Unchanged strings use no Smartwords
  • Confirmed translations stay confirmed

“Can Smartcat give us the .mo files?”

Not directly. Smartcat exports translated PO files; compiling them to MO stays in your pipeline, where one msgfmt command per language does it.

  • msgfmt fr.po -o fr.mo
    Compiles the French PO file into the MO file your app loads

Is it secure to translate PO files in Smartcat?

Yes. PO files often hold UI strings for features you haven’t released yet, and Smartcat protects that content at every step; see how on the Smartcat security page.

Role-based access controls

Set who can view, translate, review and approve projects by team, role or region on enterprise plans.

Single sign-on (SSO)

Sign in through your existing identity provider on enterprise plans.

SOC 2 Type II compliant

Smartcat is SOC 2 Type II compliant and isolates every workspace.

Never used to train public AI models

Your source strings and translations are never used to train public AI models.

Audit trails

See who changed what and when across translation and review on enterprise plans.

Encryption and deletion on request

Content is encrypted in transit and at rest, and deleted or returned within 30 days of a written request.

Resources for gettext and software localization

Guides on translating Django and Python projects that use gettext, and on running software localization as part of every release.

Gettext PO file translation FAQ

What is a PO file in gettext?

A PO (Portable Object) file is the plain-text translation file of GNU gettext, and Smartcat imports it as a bilingual file. Each entry pairs a source string (msgid) with its translation (msgstr), so one PO file holds one language. PO files are standard in Python, PHP, WordPress, Django and Drupal projects.

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

A POT file is the empty template extracted from your code, a PO file holds one language’s translations, and an MO file is the compiled binary your app loads. Smartcat translates both .po and .pot uploads into any project language and returns PO files, which you compile to MO in your build.

How do I translate a PO file?

Upload the .po or .pot file to a Smartcat project online, choose your target languages and the Serge.io PO parser if your entries carry string IDs, then let AI draft every segment. Your reviewers or marketplace linguists confirm the translations in the editor, and you export a valid PO file per language.

What is the best PO file translator?

Smartcat suits teams that translate PO files into many languages and re-upload them every release, but the best tool depends on your pipeline. Whichever you test, check that it protects placeholders, supports msgid_plural and msgctxt, keeps review history on re-upload and bills only the strings that changed. For a single file you edit once, a desktop PO editor may be all you need.

Should I use Poedit or a translation platform for PO files?

Use Poedit if one person edits one PO file at a time: it is a desktop PO editor with a free version. Use a platform like Smartcat when a team translates PO files into many languages every release, with AI drafts, reviewers working in the browser, shared translation memory and re-uploads that bill only changed strings.

Can I translate a PO file for free?

Yes, as a trial. Smartcat offers a 15-day free trial with 15,000 Smartwords and no credit card, which is enough to translate a typical PO file into a few languages and test the export in your build. Smartcat has no free plan; after the trial, usage is billed in Smartwords, as set out on the Smartcat pricing page.

Can I translate a PO file with Google Translate or ChatGPT?

No. General-purpose translators work on text you paste in, not on the PO file, so placeholders, plural forms and msgctxt are easy to break. Smartcat translates the file itself, keeps variables as locked tags and writes each translation back into msgstr, so the result still compiles.

How do I open and edit PO files?

Any plain-text editor opens a PO file, but a PO file editor is safer. Smartcat works as an online PO file editor: you upload the file and edit each entry in the browser, with the source next to the translation, developer comments as context and placeholders locked, then export the edited PO file unchanged in structure.

How do I convert PO files to MO?

Export the translated PO file from Smartcat, then run gettext’s msgfmt utility, for example msgfmt fr.po -o fr.mo, or let your framework’s build step do it. Django, WordPress and most gettext toolchains compile automatically. Smartcat doesn’t produce MO files itself, so compiling stays in your existing pipeline.

Does Smartcat support gettext plural forms (msgid_plural)?

Yes. Smartcat supports gettext plural entries: it imports msgid_plural and its msgstr[n] variants, so each plural form of a string is translated separately in every target language. Your translators see the singular and plural source side by side and fill in one translation per plural form.

How accurate is AI translation of PO files?

Accurate enough that most strings need no edit: 92% of words translated by Smartcat AI are accepted without a single human edit, and your glossary and translation memory keep UI terms consistent. Short UI strings without a #. developer comment are the exception, because a word like “Open” is ambiguous on its own, so review those in context.

Will existing translations be overwritten when I upload a partly translated PO file?

No. Smartcat lets you decide at upload what happens to the msgstr values already in the file: import them, leave them as unconfirmed drafts, confirm them at a chosen workflow stage, or lock them so nobody can edit them. Only the empty entries then need translating.

Which frameworks’ PO files can Smartcat translate?

Smartcat translates any valid gettext PO or POT file, so it handles the output of Django’s makemessages, WordPress themes and plugins, PHP and Python gettext, Drupal and other gettext toolchains. Smartcat reads the file format, not the framework, so your extraction and compile steps stay as they are. The Django localization guide shows a worked setup.

Is Smartcat affiliated with GNU gettext, Poedit, Phrase, Crowdin or Lokalise?

No. Smartcat is an independent platform with no affiliation to the GNU Project, Poedit, Phrase, Crowdin or Lokalise. Smartcat reads PO files by following the publicly documented gettext format, and the comparison on this page draws only on each vendor’s own public documentation.

Didn’t find your answer? Talk to a localization specialist

Trademark notice. Smartcat is an independent platform and is not affiliated with, endorsed by, sponsored by, or otherwise associated with the GNU Project, Poedit, Phrase, Crowdin or Lokalise. All product names and trademarks on this page belong to their respective owners and are used for identification only. Smartcat’s PO support is built on the publicly documented gettext standard and implies no partnership or certification.

Translate your next PO file into every language your users speak

See Smartcat translate one of your own PO files, from upload to a build-ready file per language, or start a 15-day free trial with 15,000 Smartwords and no credit card.