Class: LocalizedTextComponent
Fills the Text beside it with a string table entry in the current language (Engine .GetLocalization / Game.locale). LocalizedTextSystem writes Text.text whenever the key, the params, the language or the tables change — edit mode too, so the editor shows the translation. An empty key leaves the Text alone.
params fills {name} placeholders: { "value": 120 } turns "Score: {value}" into "Score: 120".
Extends
Constructors
Constructor
ts
new LocalizedTextComponent(): LocalizedTextComponent;Returns
LocalizedTextComponent
Inherited from
Properties
| Property | Modifier | Type | Default value | Inherited from |
|---|---|---|---|---|
dirty | public | boolean | true | Component.dirty |
enabled | public | boolean | true | Component.enabled |
key | public | string | undefined | - |
params | public | Record<string, string | number> | undefined | - |
Methods
SetParam()
ts
SetParam(name, value): void;Sets one param — the field is replaced, so the change is noticed.
Parameters
| Parameter | Type |
|---|---|
name | string |
value | string | number |
Returns
void