Get the plugin
WP MCP/Integrations/Multilingual

Multilingual integration

Polylang AI agent tool reference

Polylang runs multilingual WordPress sites. WP MCP exposes its language and translation model over MCP: list configured languages, read a post's translations, set a post's language, and link posts as translations of each other. It lets an AI agent keep a multilingual site's translation graph consistent while it creates and edits content.

list-languagesget-post-translationsset-post-languagelink-post-translations

In practice

How Polylang work goes with an agent.

Polylang stores multilingual data as ordinary WordPress taxonomies, which is why an agent can work with it so cleanly. A post's language is a term in the language taxonomy, and a translation group is a term in the post_translations taxonomy that lists one post id per language. WP MCP reads and sets those through Polylang's own pll functions. On a site with Polylang, an agent can set the language of imported posts, find posts with no counterpart in another language, and keep the translation graph consistent while content is created. The language assignment is genuinely undoable.

List the languages on this site and show which are the default.

Runs list-languages, which returns each Polylang language code and name with an is_default flag. Read only.

These three imported posts have no language. Set them to French.

Runs set-post-language once per post. The language is a taxonomy term on the post, so the post snapshot captures the previous assignment and rollback-operation restores it exactly.

Which published pages have no Spanish version yet?

With Pro, runs find-missing-translations for language es, post type page, status publish. It lists each page with its language and the translations it already has, paged. Read only.

Make a German draft of the Shipping page and translate its text.

With Pro, runs create-translation to copy the page as a linked draft (terms and featured image mapped to their translations), then get-page-text and apply-page-text with the content hash. Polylang's own field sync is held off so the source page is not touched.

What your AI can do

Real Polylang operations, every write reversible.

  • List the site's configured languages
  • Read the translation set for any post
  • Set a post's language
  • Link posts together as translations

Example prompts

Example Polylang prompts.

What languages is this site configured for?

Set the language of these three new posts to French.

Link the English and French versions of the About page as translations.

Under the hood

The Polylang calls, under the hood.

wpmcp, polylang

get-post-translations({ post_id: 15 }), the translation set

link-post-translations({ translations: [{ language: "en", post_id: 15 }, { language: "fr", post_id: 16 }] })

Safety and access

What can be undone on Polylang, and what costs what.

Recoverable on Polylang

  • set-post-language is restored exactly by rollback-operation, because a Polylang language is a taxonomy term the post snapshot captures.
  • With Pro, apply-page-text is one snapshotted change, all segments or none, and rollback-operation restores the post.
  • With Pro, create-translation records the new draft for rollback and the source's translation group.

Polylang limits and opt-ins

  • link-post-translations snapshots only the first (primary) post in the list, so undoing it does not restore the other posts in the group.
  • Pro create-translation refuses a post with no language yet, a post type Polylang does not translate, and a language the post already has.
  • Terms with no translation are not copied. create-translation reports them as unmapped_terms rather than guessing.

Free or Pro: Free covers the four core tools: list-languages, get-post-translations, set-post-language and link-post-translations, all needing edit_posts. Pro covers the page translation workflow: find-missing-translations, get-page-text, create-translation and apply-page-text. The same tools run on WPML when that is the active plugin, but Polylang is the one with a verified live path. None of the Pro writes sit behind an opt-in filter.

In the free plugin

The Polylang integration is in the free plugin.

The core Polylang tools ship in the free, GPL plugin with the full snapshot and undo engine, and no trial clock. Pro adds 133 more tools, including Elementor deep editing, the other page builders, the forms adapter pack and, for some integrations, extra operations. The pricing page lists what each tier includes.

Frequently asked

Polylang MCP: questions, answered.

Is Polylang support free?

The four tools listed here are free, and the same tools work with WPML when that is the active plugin. The page translation workflow on top of them (find-missing-translations, get-page-text, create-translation and apply-page-text) is a Pro operation.

Is Polylang support production-verified?

The Polylang paths are verified against a live Polylang install; CI can't exercise every third-party plugin, and we flag that honestly per release.

What shape does link-post-translations take?

A translations array of language and post_id pairs, for example en with post 15 and fr with post 16. Order matters slightly: the first entry is the primary post that gets snapshotted. Link results come back as the full translation set read from Polylang afterwards.

Does the Pro text workflow handle Elementor pages?

Yes. get-page-text returns Elementor widget text and repeater fields as numbered segments, and block and classic content as runs of text. It also returns the SEO title and description when the SEO plugin keeps them in post meta. A content hash guards the write.

Could translating one page change the original?

No, that is guarded. Polylang can copy meta and terms between linked posts, so WP MCP holds that sync off while create-translation and apply-page-text write. A translation write cannot push changes back into its source page.

What happens if the page changed while I was translating?

apply-page-text compares the content hash from get-page-text with the current one and refuses with stale_hash if they differ. Read the page again, or pass force true when you accept overwriting. The same refusal covers duplicate or unknown segment keys.

Is there an AI agent for Polylang?

Yes, through WP MCP rather than Polylang itself. An agent you choose, such as Claude or Cursor, can list the site's configured languages. WP MCP is a separate plugin, not a built-in AI feature of Polylang. On the undo side: set-post-language is restored exactly by rollback-operation, because a Polylang language is a taxonomy term the post snapshot captures.

Point your AI at Polylang.