Set the default 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 →

Set the default language

Write
TranslatePress Content & Tools translatepress/set-default-language

Promote an already-configured language to be TranslatePress's site default.

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 promotes a language that is already configured as a translation language to become the site's default language, persisting the change through TranslatePress's settings sanitizer. The target language must already be in the translation-languages list (add it first via add-language) or the ability returns an error; if the requested language is already the default, it returns the current state unchanged. The previous default language remains in the translation languages list after the swap. It returns both the new default language code and the previous default language code.

See it in action

You ask your AI assistant

"Set French (fr_FR) as the new default language for my TranslatePress site."

Inputs

Name Type Required Description
language_code string Yes Locale code to promote to default. Must already be a configured translation language.

Returns

An object with the new default_language code and the previous_default_language code.

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.