new Choice()
A choice of a choice attribute. The possible choices are defined by ChoiceRange.
Methods
equals(value) → {boolean}
Returns true if the values are equal
Parameters:
Name | Type | Description |
---|---|---|
value | Another attribute value |
Returns:
- Type:
- boolean
internalName() → {string}
Returns the internal name (key) of the choice
Returns:
The internal name
- Type:
- string
position() → {number}
Returns the position (0-based) of the choice, if defined
Returns:
- Type:
- number
untranslatedString() → {string}
Returns the untranslated string
Returns:
- Type:
- string
valueString(languageopt) → {string}
Returns the string representation of the choice. Returns the fallback string if the choice does not define a translation for a language
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
language | string | <optional> | Language of the value. If not defined, the current language will be used |
Returns:
- Type:
- string