Skip to content

Core: PalamedesI18n

Functions, types, and exports for Core: PalamedesI18n.

Page outline
import type { PalamedesI18n } from "@palamedes/core"

type PalamedesI18n = {
    readonly locale: string;
    readonly timeZone?: string;
    /** Formats a finite number or numeric string without loading a catalog. */
    number: (value: number | string, options?: Intl.NumberFormatOptions & {
        locale?: string;
    }) => string;
    /** ISO date-only strings retain their calendar date, regardless of time zone. */
    date: (value: Date | number | string, options?: Intl.DateTimeFormatOptions & {
        locale?: string;
    }) => string;
    _: (id: string, values?: MessageValues, metadata?: MessageMetadata) => string;
    load: (locale: string, messages: CompiledCatalogMessages) => void;
    activate: (locale: string) => void;
    renderMessage: <TResult>(id: string, values: MessageValues, runtime: CompiledMessageRuntime<TResult>, metadata?: MessageMetadata) => TResult;
};

Properties

NameTypeRequiredDescription
localestringYesReadonly.
timeZonestringNoReadonly.
number(value: number | string, options?: Intl.NumberFormatOptions & { locale?: string }) => stringYesFormats a finite number or numeric string without loading a catalog.
date(value: Date | number | string, options?: Intl.DateTimeFormatOptions & { locale?: string }) => stringYesISO date-only strings retain their calendar date, regardless of time zone.
_(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 10, 2026