UIString

Container for UI string - either raw value or string resource ID

Set resource id (string) or plain unicode text (dstring) to it, and get dstring.

Constructors

this
deprecated this(string id)
Undocumented in source.
this
deprecated this(dstring value)

create string with raw value; deprecated, use fromRaw() instead

this
this(string id, dstring fallbackValue)

create string with resource id and raw value as fallback for missing translations

Alias This

value

Default conversion to dstring

Members

Functions

empty
bool empty()

returns true if string is empty: neither resource nor string is assigned

opAssign
UIString opAssign(dstring rawValue)

Assign raw value

opAssign
UIString opAssign(string ID)

Assign string resource id

Properties

id
string id [@property getter]

Returns string resource id

id
string id [@property setter]

Sets string resource id

value
dstring value [@property getter]

Get value (either raw or translated by id)

value
dstring value [@property setter]

Set raw value using property

Static functions

fromId
UIString fromId(string ID, dstring fallback)

create UIString from id - will be translated; fallback value can be provided for cases if translation is not found

fromRaw
UIString fromRaw(dstring rawValue)

Create UIString from raw utf32 string value - will not be translated

fromRaw
UIString fromRaw(string rawValue)

Create UIString from raw utf8 string value - will not be translated

Meta