Update a Language

Updating an Existing Language

PUT /api/languages/{lang_id}/

To update the details of an installed language, send a PUT request to the endpoint with the language ID in the URL.

Request Example

PUT /api/languages/3/

Include the language details in the HTTP request body according to the specified Content-Type. The lang_code field is required.

Request Parameters

Parameter Type Required Description
lang_code string Yes Language code (e.g., "en", "fr", "es")
name string No Display name of the language
status string No Status of the language ("A" for Active, "H" for Hidden, "D" for Disabled)
country_code string No Two-letter country code (ISO 3166-1 alpha-2)
Important: Do not change the lang_code field of an existing language via REST API. If you do, all language variables for that language will disappear until you change the lang_code back to its original value.

Example JSON Payload

{
  "lang_code": "ts",
  "name": "Test2",
  "status": "H",
  "country_code": "RU"
}
Tip: Always write country_code in capital letters (e.g., "US", "GB", "DE").

Response

{
  "lang_id": "3"
}

Response Status Codes

Status Code Description
200 OK Language was updated successfully
400 Bad Request Invalid request parameters
404 Not Found Language with the specified ID does not exist