Skip to content

Runtime: I18nInstance

Functions, types, and exports for Runtime: I18nInstance.

Page outline

The i18n instance shape every adapter, generated module and getI18n() consumer relies on. It is core's PalamedesI18n: _() returns text, and load, activate, renderMessage and locale are required.

import type { I18nInstance } from "@palamedes/runtime"

type I18nInstance = PalamedesI18n;

Properties

NameTypeRequiredDescription
localestringYesReadonly.
timeZonestringNoReadonly.
_(id: string, values?: MessageValues, metadata?: MessageMetadata) => stringYes
load(locale: string, messages: CompiledCatalogMessages) => voidYes
activate(locale: string) => voidYes
renderMessage<TResult>(id: string, values: MessageValues, runtime: CompiledMessageRuntime<TResult>, metadata?: MessageMetadata) => TResultYes

Source entry on GitHub

Last updated: November 1, 2026