Skip to content

wordsFor beta ​

Function of @v12-engine/client

ts
export declare function wordsFor(message: Message, registry: Registry, own?: Record<string, MessageWords>, viewer?: MessageViewer, locale?: string): string;

What a message says: in the game's own words when its view has some for the key, else in the engine's, else the client's (CLIENT_WORDS). A key nobody has words for is shown as it is, so a mod that gives plain text as a reason is still understood, and what a game or a map writes as plain text is its own key. viewer is who reads: their race goes to the words that are functions. Words that are text are put in with formatWords ({param}, plurals, names), the view's in locale (its language, English when left out), the client's in English