Accessing localized typekeys from Gosu
Gosu provides three String representations that you
can use for typekeys.
Typekey property |
Description |
|---|---|
typelist.typekey |
String that represents the typecode |
typelist.typekey |
Localized language version of the entity name |
typelist.typekey |
Name listed in the data model |
For example, to extract localized information about a typekey, you can use the following:
var displayString = myTypekey.DisplayNameThe following code is a more concrete example.
print(AddressType.TC_BUSINESS.DisplayName)It is important to understand
that the display key reference acts as a method call rather than as a
value. If the language setting for the user changes, then the display
key value changes as well. However, the value stored in displayString does not automatically
change as the language changes.
