# Update WordPress installation language

This function sets the active WordPress language for an installation that
the caller owns. The system installs the translation files if the site does
not already have them, then activates the locale.

  Note:

  - The system verifies that the caller owns the installation before it
    changes anything.
  - get_admin_account does not report the active language. There is no
    function that reads it back.

Endpoint: POST /WPX/set_language
Version: 11.138.0.10
Security: BasicAuth

## Request fields (application/x-www-form-urlencoded):

  - `id` (integer, required)
    The WordPress Toolkit installation id, as returned in the wptk_id field of list_websites.
    Example: 17

  - `language` (string, required)
    The WordPress locale to activate, for example en_US, de_DE, or
pt_BR. This is a WordPress locale, not a cPanel locale. The system
accepts any locale name that matches the documented pattern, so the
list is not fixed. A locale that WordPress does not publish fails
when the system tries to install its translation files. The en_US
locale needs no translation files, so the system only activates it.
    Example: "de_DE"

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "set_language"

  - `module` (string)
    The name of the module called.
    Example: "WPX"

  - `result` (object)

  - `result.data` (object)
    The installation and the locale that is now active.

  - `result.data.id` (integer)
    The installation id that the system changed.
    Example: 17

  - `result.data.language` (string)
    The locale that is now active. This echoes the requested value.
    Example: "de_DE"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed: Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


