Skip to content

API Class LocalText

github-actions[bot] edited this page Nov 24, 2026 · 5 revisions

Class: LocalText

Defined in: src/engine/localisation/Locale.ts:221

A key and arguments, resolved when read (Unreal's FText): toString() is Locale.t(key, args) in the current language. ui.data.title = Locale.text("quest.title", { name }) shows the title and follows language changes.

Constructors

Constructor

new LocalText(key, args?): LocalText;

Defined in: src/engine/localisation/Locale.ts:226

Parameters

key

string

args?

| Readonly<Record<string, MessageArg>> | null = null

Returns

LocalText

Properties

args

readonly args: 
  | Readonly<Record<string, MessageArg>>
  | null;

Defined in: src/engine/localisation/Locale.ts:223


key

readonly key: string;

Defined in: src/engine/localisation/Locale.ts:222

Methods

toString()

toString(): string;

Defined in: src/engine/localisation/Locale.ts:237

The message in the current language (cached until the language or the tables change).

Returns

string


with()

with(args): LocalText;

Defined in: src/engine/localisation/Locale.ts:232

The same key with these arguments over its own.

Parameters

args

MessageArgs

Returns

LocalText

Clone this wiki locally