Skip to content

@jsvision/i18n / Catalog

Interface: Catalog

Defined in: types.ts:64

A validated, locale-scoped message catalog.

Example

ts
import type { Catalog } from '@jsvision/i18n';

const catalog: Catalog = {
  schema: 1,
  locale: 'nl',
  messages: { 'app.greeting': 'Hallo' },
};

Properties

locale

readonly locale: string

Defined in: types.ts:68

Canonical BCP-47 catalog locale without Unicode or private-use extensions.


messages

readonly messages: Readonly<Record<string, Message>>

Defined in: types.ts:70

Flat namespaced message-key map.


schema

readonly schema: 1

Defined in: types.ts:66

Exact schema version used by this catalog.