Update a Langvar

Updating Language Variables

PUT /api/languages/{lang_id}/langvars/{name}/

To update a language variable, send a PUT request to the endpoint with the language ID and language variable name in the URL.

URL Formats

There are two ways to update a language variable:

PUT /api/languages/1/langvars/test_variable/

Or with language code instead of ID:

PUT /api/langvars/test_variable/?sl=en

Include the new value for the language variable in the HTTP request body according to the specified Content-Type.

Example JSON Payload

{
  "value": "This is the changed text of the language variable."
}
Auto-Creation: If the language variable doesn't exist, it will be automatically created with the provided value.

Response

{
  "name": "test_variable"
}

Response Status Codes

Status Code Description
200 OK Language variable was updated (or created) successfully
400 Bad Request Invalid request parameters