new $k.Choice()
A choice of a choice attribute. The possible choices are defined by ChoiceRange.
Methods
equals() : boolean
Returns true if the values are equal
Returns:
Type | Description |
---|---|
boolean |
internalName() : string
Returns the internal name (key) of the choice
Returns:
Type | Description |
---|---|
string | The internal name |
position() : number
Returns the position (0-based) of the choice, if defined
Returns:
Type | Description |
---|---|
number |
untranslatedString() : string
Returns the untranslated string
Returns:
Type | Description |
---|---|
string |
valueString(language) : string
Returns the string representation of the choice.
Returns the fallback string if the choice does not define a translation for a language
Name | Type | Description |
---|---|---|
language |
string |
optional
Internal Error: no text for this language or unsupported language |
Returns:
Type | Description |
---|---|
string |