Update a translation language is a WordPress ability from TranslatePress — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Update a translation language

Write
TranslatePress Content & Tools translatepress/update-language

Change the URL slug and publish status of a language that's already configured in TranslatePress.

Requires the TranslatePress plugin on WordPress 6.9+ (or the Abilities API feature plugin). All abilities require the current user to have the 'manage_options' capability.

What it does

This ability updates the URL slug and published flag for an already-configured translation language, persisting the change through TranslatePress's settings sanitizer. It requires the language to already be configured (add it first via add-language), rejects an empty slug after sanitization, refuses to unpublish the site's default language since it must always remain published, and rejects a slug that collides with another configured language's slug. On success it returns the updated language code along with its resulting slug and published state.

See it in action

You ask your AI assistant

"Update the German translation in TranslatePress to use the URL slug 'de' and make sure it's published."

Inputs

Name Type Required Description
language_code string Yes Locale code of the language to update.
slug string Yes URL slug for this language.
published boolean Yes Whether this language is published on the front end.

Returns

An object with the updated language code, its resulting slug, and its resulting published boolean state.

Permission

The current user must have the 'manage_options' capability; otherwise the ability returns a 403 WP_Error.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.