Glossary
Say it precisely.
The vocabulary of this toolkit: three-letter words, packs, chains, and params — each with one exact meaning. 18 terms
Precise names for the moving parts of this toolkit. Terms are ordered alphabetically.
Agreement
Short for grammatical agreement: a message whose wording depends on context (gender, politeness, noun class) rather than on a number. In this toolkit, modeled by context params resolving through ICU select branches.
Boot
The startup sequence: detectLocale() → setLocale() → initialize(). Offline-first — returning visitors boot from the persister with zero network.
Catalog
catalog.json, emitted by the build next to the packs: per locale×namespace content hashes plus byte sizes. The single source of truth for staleness checks and download accounting.
Context param
A declared value (e.g. gender, politeness) that changes which string is selected. Declared in stift.config.ts under params.context with a canonical values union and per-locale defaults (the all catch-all is required). Supplied once at runtime via setParam or <LocaleScope> — declared params are optional at call sites.
Devtools
The TanStack Devtools panel shipped by @secundus-studio/stift-tanstack-devtool-plugin: cross-locale tables, missing-key/param logs, pack state, and live editing that writes into locales/** without a page reload.
Dialect
A locale tag with variant/private-use subtags layered on a base locale — ar-SY-x-lattakia is the Lattakia dialect of Syrian Arabic. Pure BCP 47; no separate taxonomy. Registered dialects are first-class locales with their own files, packs, and type entries.
Fallback chain
The inheritance path from most-specific to least-specific tag, always ending at the default locale: ar-SY-x-lattakia → ar-SY → ar → en. Both missing-key resolution and per-locale param/unit defaults walk it.
Formatter engine
The pluggable ICU renderer behind t(). The default is icu-mf1 (ICU MessageFormat 1). Swap via createStift({ formatter }).
g11n
Globalization — the umbrella over i18n and l10n. In the React adapter it's the Stift instance and useConfig(): the system-wide configuration and strategy.
i18n
Internationalization — the enabling engineering: message keys, t, ICU, RTL support, detection, and translation resources (packs). Distinct from l10n by convention in the hook names.
l10n
Localization — adaptation for one locale: the active locale, switching, and national conventions (date/number formatting).
Namespace
A unit of translation files and packs: locales/<locale>/<namespace>.json compiles to one .dat pack per locale. The cache, lazy loading, and eviction all operate per namespace.
Pack
The compiled binary artifact of one locale×namespace: msgpack/cbor serialization + compression, wrapped in a self-describing header. What the browser downloads, persists, and hashes — never translation JSON.
Pack manager
The Stift.pack API: install/activate/wipe locales, byte-accurate sizes, staleness checks, and the single-ping checkAllForUpdates().
Persister
Where pack bytes live across reloads: PersisterAdapter = { get, set, del, keys } over Uint8Array. Shipped implementations: OPFS, IndexedDB, Cache Storage, plus a best-effort chain. Distinct from locale persistence (the user's preference).
Schema (locale)
The default locale's files. They define every namespace's key set and key order; every other locale is values-only. New keys propagate to all locales automatically; keys added elsewhere are orphans.
Typegen
The generated stift.gen.d.ts: narrows message keys, param shapes, select categories, locales, currencies, and units to your real config and files. The reason typos are compile errors.
URL strategy
How a URL expresses the active locale: path-prefix (this site: default locale unprefixed, others prefixed), subdomain, domain, or query-param. Implemented headlessly in core, wired to TanStack Router by @secundus-studio/stift-tanstack-router-plugin.