30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Recompile Translations

This changes no translation. It rebuilds the files WordPress actually reads — the MO, the .l10n.php cache and the JSON fragments — from the PO exactly as it stands.

It is the repair for the single most common translation problem: a PO that was edited somewhere other than here.

At a glance

Abilitytranslations/compile-translations
ToolsetLoco Translate — toolset/loco-translate
GroupLoco Translate › Maintenance
RequiresLoco Translate, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Any edit to a PO outside this suite — through the file abilities, over SFTP, in a text editor — leaves the compiled artefacts describing the previous state. The site keeps serving the old strings with no error anywhere, which is why “the translation looks right in the file but wrong on the site” is such a persistent report.

Running this fixes it without touching a single string, which makes it safe to run speculatively. It is idempotent: recompiling an already-current translation rewrites the same bytes.

Check artefacts afterwards. On WordPress 6.5+ the number that matters is php_bytes, because that file is read in preference to the MO.

Input

NameTypeRequiredWhat it is
bundlestringYesBundle id, handle or slug — all three appear in Loco’s own screens. Use core for WordPress itself.
domainstringNoText domain. Omit for the bundle default.
localestringYesLocale to recompile.

What comes back

NameTypeWhat it is
artefactsobjectBytes written per artefact — po_bytes, mo_bytes, php_bytes, json_files, json_bytes. Read back from disk rather than reported by Loco, so a zero mo_bytes means the site is still serving the old strings.
filestringThe PO file that was compiled.
string_countintegerHow many strings it holds.
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:

I edited the German PO over SFTP and nothing changed on the site — fix it.

It resolves to one call:

{
  "ability": "translations/compile-translations",
  "parameters": {
    "bundle": "woocommerce",
    "locale": "de_DE"
  }
}

Worth knowing

  • Changes no strings, so it is safe to run whenever a translation looks wrong.
  • Idempotent — running it twice produces the same files.
  • If this fixes the problem, something edited the PO outside this suite. Worth finding out what.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading