Create Polylang Translation
Creates the translation of a post, page or category/tag in another language and links it to the original, the way Polylang's "+" translation button does. A post or page is created as a draft copy: title, content, excerpt, featured image, page template, custom fields, and the categories and tags that already exist in the target language are copied, and the result lists what was copied and what was not. Pass translated title, content and excerpt to fill it in straight away, otherwise translate the copy before publishing. A category or tag is created live (terms have no draft state) with the name given or the original's. Refuses when that language already has a translation, so repeating the call never makes a second copy. Get language codes from mosmcp/polylang-list-languages.
Also known as: translate this page, add French version, duplicate for translation, new translation.
| Property | Value |
|---|---|
| Ability slug | mosmcp/polylang-create-translation |
| Wire tool name | mosmcp__polylang-create-translation |
| Category | Polylang (mosmcp-polylang) |
| Plan | Pro |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_posts |
| Minimum default role | Contributor |
| Annotations | readOnly: false · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| post_id | integer (min 1) | — | The post or page to translate. Pass this or term_id, not both. | |
| term_id | integer (min 1) | — | The category, tag or other term to translate. Pass this or post_id, not both. | |
| language | string (min length 1) | Yes | — | The language to translate into: its code from mosmcp/polylang-list-languages, such as "fr", or its locale, such as "fr_FR". |
| title | string | — | The translated title (or name, for a term). Omit to copy the original's. | |
| content | string | — | Posts only: the translated content. Omit to copy the original's. | |
| excerpt | string | — | Posts only: the translated excerpt. Omit to copy the original's. | |
| description | string | — | Terms only: the translated description. Omit to copy the original's. | |
| slug | string | — | Optional URL slug for the translation. Omit to let WordPress make one from the title. | |
| status | string (one of draft, pending, publish) |
draft |
Posts only: "draft" (the default) keeps it hidden until reviewed; "pending" submits it for review; "publish" puts it live straight away and needs permission to publish. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| object_type | string | Yes | "post" or "term". |
| source | object | Yes | |
| source.id | integer | Yes | |
| source.type | string | Yes | Post type, or taxonomy for a term. |
| source.title | string | Yes | Title, or name for a term. |
| source.status | string | Post status; empty for a term. | |
| source.slug | string | ||
| source.language | string | Yes | |
| source.edit_url | string | ||
| translation | object | Yes | |
| translation.id | integer | Yes | |
| translation.type | string | Yes | Post type, or taxonomy for a term. |
| translation.title | string | Yes | Title, or name for a term. |
| translation.status | string | Post status; empty for a term. | |
| translation.slug | string | ||
| translation.language | string | Yes | |
| translation.edit_url | string | ||
| translations | object | Yes | The whole translation group now: language code => ID. |
| copied | string[] | What was copied from the original. | |
| terms_not_copied | object[] | Categories and tags of the original with no version in the target language, so they were left off. | |
| terms_not_copied[].taxonomy | string | Yes | |
| terms_not_copied[].term_id | integer | Yes | |
| terms_not_copied[].name | string | Yes | |
| terms_not_copied[].reason | string | ||
| notes | string[] |
| << Previous | Next >> |
|---|---|
| Link Polylang Translations |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.