Link Post Translations

Two posts can be perfect translations and still behave like strangers: the language switcher sends visitors to the home page and search engines see no hreflang link.

content/link-post-translation groups them as translations of one another.

At a glance

Abilitycontent/link-post-translation
ToolsetContent — toolset/content
GroupTranslations › Posts
RequiresPolylang or WPML, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.1.0 and later

How it works

Pass a map of language code to post ID, for example { "en": 42, "fr": 88 }.

With Polylang it calls pll_save_post_translations(); with WPML it links every post to the same translation group (trid).

Each post should already have its own language set.

Input

NameTypeRequiredWhat it is
translationsobjectYesMap of language code → post ID, e.g. { "en": 5, "fr": 9 }.

What comes back

NameTypeWhat it is
driverstringWhich plugin handled the call.
translationsobjectThe translation group as saved.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Make post 88 the French version of post 42.

It resolves to one call:

{
  "ability": "content/link-post-translation",
  "parameters": {
    "translations": {
      "en": 42,
      "fr": 88
    }
  }
}

Worth knowing

  • Include every language in the group each time — the map you pass becomes the group.
  • Set each post’s language first if it has none.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading