Most of the texts in Venddor are stored in language variables (or langvars for short). This approach allows different languages to display different texts for the same content elements, providing a consistent multilingual experience.
https://your-store-url.com/api
Language variables are key-value pairs where the key is the variable name (e.g., "product_added_to_cart") and the value is the text to display in the specific language (e.g., "Product has been added to your cart").
Returns language variables for the default language in your store.
[ { "lang_code": "en", "name": "shopping_cart", "value": "Shopping Cart" }, { "lang_code": "en", "name": "add_to_cart", "value": "Add to Cart" }, { "lang_code": "en", "name": "checkout", "value": "Checkout" } ]
Returns language variables for a specific language.
Parameter | Type | Description |
---|---|---|
lang_id* | integer | The unique identifier of the language |
Alternatively, you can use the language code:
GET /api/langvars/?sl=es
The above example will return language variables for Spanish (es
).