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
| Ability | translations/compile-translations |
| Toolset | Loco Translate — toolset/loco-translate |
| Group | Loco Translate › Maintenance |
| Requires | Loco Translate, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI 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
| Name | Type | Required | What it is |
|---|---|---|---|
bundle | string | Yes | Bundle id, handle or slug — all three appear in Loco’s own screens. Use core for WordPress itself. |
domain | string | No | Text domain. Omit for the bundle default. |
locale | string | Yes | Locale to recompile. |
What comes back
| Name | Type | What it is |
|---|---|---|
artefacts | object | Bytes 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. |
file | string | The PO file that was compiled. |
string_count | integer | How many strings it holds. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present 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
- Update Translation Strings — the write that compiles for you
- Get Translation Status — whether the PHP cache is in play
- Sync Translations — when the template has moved on
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category