ILocalizable

Description

interface Tinman.Engine.GUI.ILocalizable

Extended by

Component abstract
IWidget
IWidgetGui
Localizable sealed

Base interface for classes that support localization / customization of text labels.

An implementing class defines one string constant for each text label it exposes:

[Localized]
public const string LabelXYZ = "X, Y and Z";

The text label string constants follow the rules that are depicted by Localized. Then, the current localized text may be queried with Localize1 and updated with Localize2.

Public / Methods

Localize

2 overloads


[Pure]
public method Localize1 → (1)

label in : string

The value of the text label string constant (see Localized) or null.

returns → string

The current localized text or null if label in is null.

Returns the current localized text for the given label.

Usually the lookup for localized texts is performed along some kind of object hierarchy. In this case, the documentation of the implementing class will describe this behaviour.


public method Localize2 → (2)

label in : string

[not-empty]
The value of the text label string constant (see Localized).

value in : string

The custom localized text to use, the empty string (to force use of the default localized text) or null to clear (which usually causes lookups to cascade to parent objects, see remarks).

Sets or clears the localized text for the given label.

Usually, localized texts are specified along some kind of object hierarchy, cascading to child objects. In this case, the documentation of the implementing class will describe this behaviour.