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
WritePromote 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.
More TranslatePress abilities
Add a translation language
Add a new translation language to TranslatePress, subject to the current license's language limit.
Enable Automatic Translation
Turns on TranslatePress's Automatic Translation, optionally selecting which translation engine to use.
List available language codes
Return the full catalog of locale codes TranslatePress recognizes, each with its English name.
List configured languages
Retrieve the languages currently configured in TranslatePress, including which is the default and which are published.
Remove a translation language
Remove a configured translation language from TranslatePress.
Set TranslatePress license key
Save a TranslatePress license key and trigger a live validation check against TranslatePress's licensing servers.