Selkies
Developer ReferenceDashboard (Wish)

i18n

Shared translator: the classic dashboard's dictionary (imported straight from its addon, like the touch-gamepad import in main.jsx) overlaid with the wish-only strings in translations-extra.ts. Extras are consulted first, then the classic translator with its built-in English fallback. Language follows navigator.language, resolved once at module load, the same policy as classic.

Variables

raw

const raw: any = base.raw;

Defined in: i18n.ts:50

The classic translator's raw-dictionary accessor.

Functions

lookup()

function lookup(dict, key): unknown;

Defined in: i18n.ts:24

Resolves a dotted key against a nested dictionary.

Parameters

ParameterType
dictany
keystring

Returns

unknown


interpolate()

function interpolate(text, vars?): string;

Defined in: i18n.ts:28

Substitutes {name} placeholders from vars, leaving unknown ones intact.

Parameters

ParameterType
textstring
vars?Record<string, unknown>

Returns

string


t()

function t(key, vars?): string;

Defined in: i18n.ts:36

Translates a dotted key, wish extras first, then the classic dictionary.

Parameters

ParameterTypeDescription
keystringDotted lookup key.
vars?Record<string, unknown>Values for {name} placeholders in the string.

Returns

string


tl()

function tl(key, vars?): string;

Defined in: i18n.ts:46

Label variant of t: classic labels often end in : (or fullwidth ) and wish renders its own label styling, so a trailing colon is stripped.

Parameters

ParameterType
keystring
vars?Record<string, unknown>

Returns

string

On this page

Edit on GitHub