wp_set_post_language
Assigns a configured Polylang language to an existing editable post. Refuses to change the language of a post already linked to translations. Does not link posts as translations; concurrent changes elsewhere can race with this best-effort linked-post check.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site_id": "<site_id>",
"id": "<id>",
"lang": "<lang>"
},
"name": "wp_set_post_language"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| lang | Yes | Configured Polylang language slug. | |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. |