Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing common languages, units of measurements, and numerical formatting standards. As such, Nodes that visually or audibly convey information need a mechanism by which they can be configured to use a user’s preferred language, units, etc.

This cluster supports an interface to a Node. It provides attributes for determining and configuring localization information that a Node shall utilize when conveying values to a user.

MatterSpecification.v13.Core § 11.3

interface Cluster {
    attributes: Merge<{
        activeLocale: WritableAttribute<string, any>;
        supportedLocales: FixedAttribute<string[], any>;
    }, GlobalAttributes<{}>>;
    base: undefined;
    commands: {};
    events: {};
    extensions: undefined;
    features: {};
    id: Branded<43, "ClusterId">;
    name: "LocalizationConfiguration";
    revision: 1;
    supportedFeatures: {};
    unknown: false;
    alter<const AlterationsT>(alterations: AlterationsT): WithAlterations<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, AlterationsT>;
    enable<const FlagsT>(flags: FlagsT): WithFlags<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, FlagsT>;
    set<const ValuesT>(values: ValuesT): WithValues<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, ValuesT>;
    with<const SelectionT>(...selection: SelectionT): Of<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, SelectionT>;
}

Hierarchy (view full)

Properties

attributes: Merge<{
    activeLocale: WritableAttribute<string, any>;
    supportedLocales: FixedAttribute<string[], any>;
}, GlobalAttributes<{}>>

Type declaration

  • ReadonlyactiveLocale: WritableAttribute<string, any>

    The ActiveLocale attribute shall represent the locale that the Node is currently configured to use when conveying information. The ActiveLocale attribute shall be a Language Tag as defined by BCP47 [https://tools.ietf.org/rfc/bcp/bcp47.txt]. The ActiveLocale attribute shall have a default value assigned by the Vendor and shall be a value contained within the SupportedLocales attribute.

    An attempt to write a value to ActiveLocale that is not present in SupportedLocales shall result in

    a CONSTRAINT_ERROR error.

    MatterSpecification.v13.Core § 11.3.4.1

  • ReadonlysupportedLocales: FixedAttribute<string[], any>

    The SupportedLocales attribute shall represent a list of locale strings that are valid values for the ActiveLocale attribute. The list shall NOT contain any duplicate entries. The ordering of items within the list SHOULD NOT express any meaning.

    MatterSpecification.v13.Core § 11.3.4.2

base: undefined
commands: {}
events: {}
extensions: undefined
features: {}
id: Branded<43, "ClusterId">
name
revision
supportedFeatures: {}
unknown

Methods

  • Modify elements using ElementModifier.alter.

    Type Parameters

    • const AlterationsT extends Alterations<Of<{
          attributes: {
              activeLocale: WritableAttribute<string, any>;
              supportedLocales: FixedAttribute<string[], any>;
          };
          id: 43;
          name: "LocalizationConfiguration";
          revision: 1;
      }>>

    Parameters

    Returns WithAlterations<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, AlterationsT>

  • Modify elements using ElementModifier.enable.

    Type Parameters

    • const FlagsT extends ElementFlags<Of<{
          attributes: {
              activeLocale: WritableAttribute<string, any>;
              supportedLocales: FixedAttribute<string[], any>;
          };
          id: 43;
          name: "LocalizationConfiguration";
          revision: 1;
      }>>

    Parameters

    Returns WithFlags<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, FlagsT>

  • Modify elements using ElementModifier.set.

    Type Parameters

    • const ValuesT extends {
          activeLocale: string;
          supportedLocales: string[];
      }

    Parameters

    Returns WithValues<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, ValuesT>

  • Select features using ClusterComposer.compose.

    Type Parameters

    • const SelectionT extends FeatureSelection<Of<{
          attributes: {
              activeLocale: WritableAttribute<string, any>;
              supportedLocales: FixedAttribute<string[], any>;
          };
          id: 43;
          name: "LocalizationConfiguration";
          revision: 1;
      }>>

    Parameters

    Returns Of<Of<{
        attributes: {
            activeLocale: WritableAttribute<string, any>;
            supportedLocales: FixedAttribute<string[], any>;
        };
        id: 43;
        name: "LocalizationConfiguration";
        revision: 1;
    }>, SelectionT>