@suluk/i18n - v0.1.0
    Preparing search index...

    Function defineLocales

    @suluk/i18n — the locale primitive every content app needs. Consolidates the fragmented i18n surface into one package: a typed locale/direction model (defineLocales/dirOf), a Workers-safe message loader with default-locale fallback + {token} interpolation (t), compile-time key-parity + a runtime completeness grade, Intl number/ currency/date formatting (incl. Eastern-Arabic numerals), and framework-agnostic cookie→locale resolution. The catalog CONTENT is app-authored; this owns the MECHANISM. Astro middleware glue is the @suluk/i18n/astro subpath. CANDIDATE tooling.

    • Define an app's locale set. Pass-through (preserves literal types under <const>) so callers get a precise LocaleCode<typeof config> union AND the config to feed the loader/resolver/formatter.

      Type Parameters

      Parameters

      • config: C

      Returns C