Skip to main content

Function: formatMessage()

function formatMessage(
text,
vars,
cfg
): string;

Defined in: packages/core/src/i18n/message.ts:444

Formats a Mini-Message string.

Malformed input throws RasdError RASD_I18N_SYNTAX in development and returns the source text verbatim in production — never a blank label (docs/13 §4, docs/17 §2.6).

Values are inserted as plain text; the renderers add the bidi isolates (<bdi> on web, U+2066…U+2069 on native) because only they know the output medium.

Parameters

ParameterType
textstring
varsRecord<string, unknown>
cfgLocaleConfig

Returns

string