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

Start free trial

Delete Translation File

translations/delete-translation-file removes a locale’s translation and everything compiled from it: the PO, the MO, the .l10n.php cache and any JSON fragments.

The translated strings go with it. There is no trash and no revision behind a PO file.

Before you run it

This cannot be undone and the translations are not recoverable, so the call refuses without confirm: true. Note that deleting only the PO through the file abilities would leave the compiled artefacts behind — and the site would carry on serving the translations you thought you had deleted.

At a glance

Abilitytranslations/delete-translation-file
ToolsetLoco Translate — toolset/loco-translate
GroupLoco Translate › Translation Files
RequiresLoco Translate, active on the site
Capabilitymanage_options
SafetyDestructive — deletes stored values, and refuses to run without confirm: true
RepeatableNot idempotent — each call changes the row set, so re-running is not a no-op
Ships inAcrossAI Abilities Manager 0.0.34 and later

How it works

Every artefact goes in one operation, which is the reason to use this rather than a file delete. A half-deleted translation is worse than either state: the source is gone, so it cannot be edited, but the compiled cache remains, so it still renders.

The response lists exactly which files were removed, so the completeness of the deletion is visible rather than assumed.

The confirmation gate runs before anything is touched.

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 delete.
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
deletedarrayThe files that were removed.
deleted_countintegerHow many files were removed.
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:

Remove the Italian translation for this plugin — we’re not shipping Italian.

It resolves to one call:

{
  "ability": "translations/delete-translation-file",
  "parameters": {
    "bundle": "woocommerce",
    "locale": "it_IT",
    "confirm": true
  }
}

Worth knowing

  • Not recoverable. Export the PO first if the translations have any value.
  • Deleting the PO alone elsewhere leaves the site still serving the translation. This is the complete operation.
  • An official WordPress.org pack can be fetched again with translations/fetch-translations; a hand-made translation cannot.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading