Skip to content
Tutorial 12 min read Updated May 24, 2026

How to AI Translate WordPress Plugin & Theme Strings

A 2026 tutorial for AI-translating WordPress plugin and theme .po and .mo files with LocoAI on top of Loco Translate. Unlimited free translation using Google Translate or Chrome built-in AI, no API key required.

How to AI Translate WordPress Plugin & Theme Strings
TL;DR · Quick Summary
  • WordPress stores plugin and theme interface text in .po and .mo files, completely separate from your site content. Multilingual plugins like WPML or Polylang do not touch them.
  • Loco Translate is the standard WordPress plugin for editing .po files. LocoAI is our addon that adds AI translation buttons on top of the Loco interface.
  • LocoAI ships with Google Translate and Chrome built-in AI for completely free unlimited translation. No API key, no monthly cost, no third-party translation service required.
  • LocoAI also supports OpenAI, Gemini and DeepL with your own API key for tone-heavy strings where premium quality matters.
  • The free LocoAI version on WordPress.org has 75,000+ active installs and includes the free providers, so you can translate a complete plugin or theme at zero cost from day one.
Don't have time? Read this article with AI:

Quick disclosure before the tutorial: I work at Cool Plugins, the team behind LocoAI, which is the AI translation addon this post centres on. WordPress has two completely different translation problems. One is translating your site content (posts, pages, products). The other is translating the WordPress interface itself (plugin labels, theme strings, button text). This post is about the second problem and how to solve it with AI in 2026.

The two-translation problem most guides skip

Site content (the article you are reading now, a product description, a contact page) lives in your WordPress database and gets translated by a multilingual plugin like Polylang, WPML or TranslatePress on top of an AI addon. Plugin and theme interface text (the "Add to cart" button, the "Settings saved" notice, the field labels in your form plugin) lives in .po and .mo files shipped inside each plugin or theme. Multilingual plugins do not touch those files. You need a different tool.

That tool is Loco Translate on its own for manual editing, and LocoAI on top for AI bulk translation. The combination handles every plugin and theme string in your WordPress install, including the WP admin itself.

What .po and .mo files actually are

Plugins and themes ship their interface text in .po files. It is a text format from the GNU gettext project. The .po file lists every translatable string in the plugin or theme along with its translation per language. When WordPress runs, it loads the compiled .mo binary version for performance.

If you have ever seen a plugin where some buttons are in English and others in your language, it is almost always a missing or incomplete .po file. Translate the file, Loco Translate compiles the .mo automatically and the next page load shows the UI in your language.

Loco Translate: the foundation

Loco Translate is the WordPress plugin for managing .po and .mo files inside your WP admin. Install it from WordPress.org, navigate to any plugin or theme and you get a list of translatable strings with input fields per language. It is free, well maintained and has more than a million active installs at the time of writing.

Loco Translate WordPress plugin for editing .po and .mo language files
Loco Translate is the standard WordPress plugin for editing plugin and theme .po and .mo language files inside the WP admin.

On its own, Loco Translate is a manual editor. You click each string and type the translation. That is fine for a 50-string plugin. For a 5,000-string theme like Avada, a complex WooCommerce extension or your entire WordPress admin in a new language, manual translation is simply not the right tool.

LocoAI: AI translation inside Loco Translate

LocoAI is our addon for Loco Translate. It adds AI translation buttons directly into the standard Loco interface, so the workflow stays exactly the way you already use it. You just get a "Translate with AI" option on every string plus a bulk translate action for handling thousands of strings at once.

LocoAI AI translation addon for Loco Translate
LocoAI adds AI translation buttons inside Loco Translate. Translate plugin and theme strings in bulk with five AI providers including two free unlimited options.

LocoAI ships with five AI providers, two of them completely free with no API key required:

  • Google Translate: free, unlimited, no API key. Built into LocoAI, no Google Cloud account needed. Best general-purpose first-pass for plugin and theme UI strings.
  • Chrome built-in AI: free, unlimited, runs entirely in your browser. No API key, no quota, no data leaves your machine. Ideal for unreleased plugins, commercial themes and any privacy-sensitive translation work.
  • OpenAI (your own API key): best for marketing-y plugin descriptions and onboarding text where tone matters.
  • Gemini (your own API key): cheapest paid premium provider, generous free tier on Google AI Studio.
  • DeepL (your own API key): best for European languages like German, French, Spanish, Italian.

The headline is the first two providers. You can translate an entire plugin or theme into multiple languages with zero ongoing cost using Google Translate or Chrome built-in AI inside LocoAI. No API keys, no monthly bills, no third-party translation services. That covers the majority of real-world plugin and theme translation work.

LocoAI for Loco Translate
Translate WordPress plugins and themes for free with AI.

Bulk-translate .po files inside Loco Translate using Google Translate or Chrome built-in AI. Unlimited translation, no API key, no monthly cost.

See LocoAI

The free LocoAI version on WordPress.org

LocoAI has a free version on WordPress.org with over 75,000 active installs. The free build ships with Google Translate and Chrome built-in AI ready to go, which means you can run the complete bulk translation workflow at zero cost from day one. The premium version unlocks OpenAI, Gemini and DeepL for teams that want higher quality on tone-heavy strings. The product page covers the full feature comparison.

Step by step: AI translate a plugin or theme with LocoAI

Full setup is about five minutes the first time. Every translation job after that is two or three clicks from the Loco Translate interface.

Step 1. Install Loco Translate and LocoAI

Install Loco Translate from WordPress.org. Install LocoAI alongside it (free or premium). Activate both. LocoAI detects Loco Translate automatically and hooks into its standard interface.

Step 2. Open LocoAI settings and pick a provider

Go to the LocoAI settings page in your WordPress admin. Pick a provider:

  • For free unlimited translation: Google Translate or Chrome built-in AI. No API key required.
  • For premium tone-aware translation: OpenAI, Gemini or DeepL. Paste your API key and save.

Most plugin developers and site owners I work with use Chrome built-in AI as the default. Free, offline, private, no quota. Switch to OpenAI only for the strings that really need tone polish (marketing copy, plugin descriptions, customer-facing messages).

Step 3. Navigate to the plugin or theme

In WordPress admin, go to Loco Translate then Plugins (or Themes). Pick the plugin or theme you want to translate. Loco shows you the available languages and any existing translations.

Step 4. Add a new language or open an existing translation

Click "+ New language" if your target language is not there yet. Pick the language and the file location (use the default "System" location so your translations survive plugin or theme updates). Loco scans the source code and shows every translatable string in a clean table.

Step 5. Run AI bulk translation

With LocoAI active, you will see a "Translate with AI" button in the toolbar. Click it. LocoAI sends all untranslated strings to your selected provider in batches and fills in the translations. Coffee break. For a 1,000-string plugin, the whole bulk pass usually takes a few minutes.

Step 6. Review and refine

Walk through the output, especially strings with placeholders, HTML or technical terms. LocoAI preserves placeholders automatically, but spot-checking the first dozen entries is good practice. Edit any string in place. Save when you are happy.

Step 7. Compile to .mo

Loco Translate compiles the .mo file automatically on save. Your translations are live. WordPress will load them on the next request to that plugin or theme.

Picking the right LocoAI provider

A short decision framework:

  • Default for everything: Chrome built-in AI. Free, unlimited, in-browser, no API key.
  • If Chrome built-in AI is not available on your machine: Google Translate inside LocoAI. Also free, also unlimited, no API key needed.
  • Marketing-heavy plugin descriptions or customer-facing UI: OpenAI with your own API key. Best tone of the five providers.
  • High volume work where you still want premium quality: Gemini Flash. Roughly 10× cheaper than OpenAI for comparable quality on most language pairs.
  • European-language theme or plugin (German, French, Spanish, Italian): DeepL with your own API key. Still the leader on those specific languages.

On real projects the most common workflow is Chrome AI or Google Translate for the bulk first pass, then OpenAI on the dozen or so strings that face the end customer (welcome messages, plugin description, onboarding flow). Total cost: zero for the bulk, pennies for the polish.

Where translations get stored

This is one of the more confusing parts of .po translation, so it is worth being explicit:

  • Plugins (WordPress.org locations): /wp-content/languages/plugins/{plugin-slug}-{locale}.po
  • Plugins (in-plugin locations): {plugin-folder}/languages/ for translations the plugin ships with
  • Themes: /wp-content/languages/themes/{theme-slug}-{locale}.po. Themes often also ship their own in {theme-folder}/languages/
  • Core WordPress: /wp-content/languages/{locale}.po for the WP admin itself

Loco Translate handles the location for you. The default "System" save location is /wp-content/languages/, which means your translations survive plugin and theme updates. If you save inside the plugin or theme folder instead, an update can overwrite them. Stick with System unless you have a specific reason to save elsewhere.

Special cases that trip people up

Placeholders like %s, %d and %1$s

Strings like "Welcome back, %s!" use placeholders that get replaced at runtime. The AI must not translate %s or change its position. LocoAI handles this automatically and preserves placeholder order across all five providers.

HTML embedded in strings

Strings sometimes contain HTML, for example "Click <a href='%s'>here</a> to login". LocoAI preserves the HTML structure and only translates the surrounding text. Other generic AI tools may mangle the tags, so this is one of the practical advantages of using LocoAI rather than copy-pasting through a chat interface.

Context strings (msgctxt)

Some plugins use translation context to distinguish identical strings with different meanings. Classic example: "Post" as a noun (a blog post) vs "Post" as a verb (to send). LocoAI passes context to the AI provider so it picks the right translation in each case.

Plural forms

Strings like "%d comment / %d comments" have plural forms that vary by language. Some Slavic languages have five or six plural forms. LocoAI translates each form correctly. You will see them as separate fields in Loco Translate's interface.

Common use cases for .po translation

Plugin developer shipping a multilingual plugin

You wrote a plugin. You want it usable in Spanish, French, German, Italian and Portuguese. Translate your .po file via LocoAI using Chrome built-in AI (so unreleased plugin source never leaves your machine), save to your plugin's /languages/ folder, ship the translations bundled with your plugin. Users in those locales get a translated interface automatically the next time WordPress loads.

Site owner with a half-translated plugin

You are running a plugin and most of it shows in your language, but some strings (newer features, less-popular plugins) are still in English. Load the .po file in Loco Translate, run LocoAI on the untranslated strings using Google Translate or Chrome AI, save. Site UI is fully in your language at zero cost.

Agency translating a client's WordPress backend

Client wants the WP admin in Japanese including all installed plugins. Loco Translate scans every active plugin and theme. LocoAI bulk-translates the missing entries. A few hours of work for what would otherwise take weeks of manual data entry. The cost stays at zero when you use the free providers.

Quick FAQ on .po translation

Will WordPress.org's translation team translate my plugin for me? Sometimes. If your plugin gets popular, volunteer translators may contribute through translate.wordpress.org. Do not count on it. Ship your own translations first and let volunteers improve them later.

Does AI translation hurt my plugin's quality? If you are shipping software, review the AI output. Modern AI handles UI strings well, but technical context (file paths, error codes, branded terms) sometimes needs adjustment. Treat AI as a first draft, then skim the customer-facing strings before release.

Can I translate WPML, Polylang or TranslatePress's own admin strings this way? Yes. All three ship .po files for their own UI. Translate them via Loco Translate plus LocoAI just like any other plugin.

TranslateXYZ Bundle
Translating .po files and your site content?

The bundle covers LocoAI for plugin and theme strings plus AutoPoly, AutoMLP and AutoTP for site content translation. One license for the full multilingual stack.

View bundle pricing

Wrapping up

Site content and plugin or theme UI strings are two different translation problems with two different toolsets. For UI strings (anything inside a plugin or theme), LocoAI on top of Loco Translate is the cleanest workflow. The free version on WordPress.org with 75,000+ active installs ships with Google Translate and Chrome built-in AI included, both completely free and unlimited. That covers the majority of real-world .po translation work without spending anything on API keys or third-party services.

For site content (posts, pages, WooCommerce products, custom post types), the matching workflow lives elsewhere. The WPML AI translation guide, the Polylang AI translation guide and the TranslatePress AI translation guide each cover that side end to end. If you are still deciding which multilingual plugin to use, the three-way comparison is the right starting point.

Frequently asked questions

The most common questions about this topic.

.po files are human-readable translation files for plugins and themes. They list every translatable string in the plugin or theme along with its translation per language. .mo files are the compiled binary versions that WordPress actually reads at runtime. When you translate a plugin or theme, you edit the .po file. Loco Translate compiles the .mo file automatically on save.

Loco Translate is the standard WordPress plugin for editing .po and .mo files inside the WP admin. LocoAI is our addon on top that adds AI translation buttons inside the Loco interface, including a bulk translate action for handling thousands of strings at once. LocoAI requires Loco Translate to be installed first.

Yes. LocoAI ships with Google Translate and Chrome built-in AI as completely free providers with no API key required. Both translate unlimited strings at zero ongoing cost. The free version of LocoAI on WordPress.org has both providers built in, so you can run the full bulk translation workflow at zero cost.

Two reasons. First, it is completely free and unlimited, which is ideal for translating large plugins or themes with thousands of strings. Second, it runs entirely in your browser, so plugin source text never leaves your machine. Especially useful for unreleased plugins, commercial themes or any privacy-sensitive translation work.

Only if the AI translates placeholder variables like %s or %d. LocoAI knows to preserve these. It skips placeholders and translates only the surrounding text. HTML embedded in strings is handled the same way. Always spot-check the first dozen translated strings before saving and shipping.

In /wp-content/languages/plugins/ and /wp-content/languages/themes/ for translations downloaded through WordPress.org. Plugins can also ship their own translations in their internal /languages/ folder. Loco Translate locates them automatically and offers a clean UI to pick which file to translate. The default "System" save location keeps translations safe across plugin and theme updates.

Yes. All three ship .po files for their own UI. Translate them via Loco Translate plus LocoAI just like any other plugin. This is also how you would translate a half-finished WordPress core locale, a commercial theme like Avada or any custom plugin you have built for a client.

You can translate WooCommerce's own plugin strings (labels, error messages, admin notices, checkout text) through this workflow. Customer-facing product content like product titles and descriptions is a different problem. For that you want WPML plus AutoMLP, Polylang plus AutoPoly or TranslatePress plus AutoTP.