Capabilities
Create a Capability Localization for a Locale
Add translated values in a desired language (i.e. locale) for a Capability. The locale is the abbreviated, internationalization code associated with the language for which values will be stored. Translated values can include: capability name labels, attribute name labels and attribute value labels.
post/capabilities/{capabilityId}/{capabilityVersion}/i18n
Request
- Base URLhttps://api.smartthings.com/v1
- AuthOAuth 2Implicithttps://auth-global.api.smartthings.comScopesw:customcapability
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"tag": "en",
"label": "Modo de ar condicionado",
"description": "Modo de ar condicionado",
"attributes": {
"airConditionerMode": {
"displayTemplate": "é suposto {{device.label}} a palavra {{attribute}} igual a {{value}}.",
"label": "Este é o modo de ar condicionado",
"i18n": {
"value": {
"auto": {
"label": "Auto",
"description": "Este é o modo automático"
},
"cool": {
"label": "Frio",
"description": "Este é o modo frio"
}
}
}
}
},
"commands": {
"setAirConditionerMode": {
"arguments": {
"mode": {
"i18n": {
"auto": {
"label": "Auto"
},
"cool": {
"label": "Frio"
}
}
}
}
}
}
}Response
successful creation of a Capability localization
Example response
{
"tag": "en",
"label": "Modo de ar condicionado",
"description": "Modo de ar condicionado",
"attributes": {
"airConditionerMode": {
"displayTemplate": "é suposto {{device.label}} a palavra {{attribute}} igual a {{value}}.",
"label": "Este é o modo de ar condicionado",
"i18n": {
"value": {
"auto": {
"label": "Auto",
"description": "Este é o modo automático"
},
"cool": {
"label": "Frio",
"description": "Este é o modo frio"
}
}
}
}
},
"commands": {
"setAirConditionerMode": {
"arguments": {
"mode": {
"i18n": {
"auto": {
"label": "Auto"
},
"cool": {
"label": "Frio"
}
}
}
}
}
}
}Changes
No recorded changes to this operation across all 8 revisions of this API.