Language variables (langvars) are used to store text content that appears on your storefront and administration panel in different languages. This endpoint allows you to create new language variables for either the default language or a specific language.
Creates a language variable for the default language.
Creates a language variable for a specific language.
Parameter | Type | Description |
---|---|---|
lang_id | integer | The ID of the language for which to create the variable. |
POST /api/langvars/?sl=en
Pass the following parameters in the HTTP request body according to your specified Content-Type
:
Parameter | Type | Required | Description |
---|---|---|---|
name* | string | Yes | The internal name of the language variable in Venddor. This is the identifier used when retrieving this variable via the API. |
value | string | No | The actual text that people will see on the storefront or in the Administration panel. |
{ "name": "test_variable", "value": "This is the text that will appear instead of the language variable for the specified language." }
{ "name": "test_variable" }
Returned when the language variable couldn't be created due to invalid parameters or other issues.
When creating language variables, consider the following best practices: