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
| Name | Type | Required | Description |
|---|---|---|---|
locale | string | Yes | Readonly. |
timeZone | string | No | Readonly. |
number | (value: number | string, options?: Intl.NumberFormatOptions & { locale?: string }) => string | Yes | Formats a finite number or numeric string without loading a catalog. |
date | (value: Date | number | string, options?: Intl.DateTimeFormatOptions & { locale?: string }) => string | Yes | ISO date-only strings retain their calendar date, regardless of time zone. |
_ | (id: string, values?: MessageValues, metadata?: MessageMetadata) => string | Yes | |
load | (locale: string, messages: CompiledCatalogMessages) => void | Yes | |
activate | (locale: string) => void | Yes | |
renderMessage | <TResult>(id: string, values: MessageValues, runtime: CompiledMessageRuntime<TResult>, metadata?: MessageMetadata) => TResult | Yes |
Last updated: November 10, 2026