ILocaleOptions

interface
Internationalisation

Configuration options for the built-in Origam locale adapter — passed to createLocale() when not using a third-party i18n library.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

locale
string
Initial locale code, e.g. "en". Falls back to browser navigator.language when omitted.
fallbackLocale
string
Locale code used when a key is not found in the active locale messages.
messages
Record<string, unknown>
Map of locale codes to their message objects, e.g. { en: { ok_label: "OK" }, fr: { ok_label: "OK" } }.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Providing locale options to createOrigam

typescript