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

Request body

tagstring required

The tag of the locale as defined in RFC bcp47.

labelstring

A localized label for the capability

descriptionstring

A localized description of the capability

attributesobject

Map of attribute name to localizations

commandsobject

Map of command name to localizations

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

tagstring required

The tag of the locale as defined in RFC bcp47.

labelstring

A localized label for the capability

descriptionstring

A localized description of the capability

attributesobject

Map of attribute name to localizations

commandsobject

Map of command name to localizations

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.