Capabilities

Update a Capability Localization by Locale

Update existing translated values for a given language (i.e. locale) associated with a Capability. The locale is the abbreviated, internationalization code associated with the language for which values will be updated.<br /><br /> If the tag argument is provided in the request body, it will be ignored.

put/capabilities/{capabilityId}/{capabilityVersion}/i18n/{locale}

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 update 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.