Skip to main content Link Menu Expand (external link) Document Search Copy Copied

MessageNumber.matchSelectKey() method

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

In addition to matching exact values, numerical values will also match keys with the same plural rule category, i.e. one of zero, one, two, few, many, and other.

Signature:

matchSelectKey(key: string): boolean | {
        plural: Intl.LDMLPluralRule;
    };

Parameters

Parameter Type Description
key string  

Returns:

boolean | { plural: Intl.LDMLPluralRule; }

Remarks

Different languages use different subset of plural rule categories. For example, cardinal English plurals only use one and other, so a key zero will never be matched for that locale.