Introduction
ilingo is a small, framework-agnostic translation and internationalization library for TypeScript. It gives you four things and nothing more:
- An orchestrator (
Ilingo) that resolves a key against a locale chain. - A port (
IStore) with two stock adapters: in-memory and file-system. - A template engine for
{{var}}substitution plusIntlformatters. - An optional typed-catalog mode that turns typos into compile errors.
Everything else — pluralization, fallback chains, missing-key handling, framework adapters — composes from those four pieces.
Why ilingo?
- Tiny. The core has two runtime dependencies. ESM-only, browser-safe, no
node:imports in the core. - Pluggable. A custom store is one class implementing three methods.
- Locale-first resolution. A
pt-BRrequest walkspt-BR → pt → enbefore giving up — and the closest locale wins regardless of which store holds it. - Standards-aligned. Plurals go through
Intl.PluralRules. Formatters delegate toIntl.NumberFormat,Intl.DateTimeFormat,Intl.ListFormat. - Type-safe when you want. Drop in
defineCatalog()and the compiler enforces every group, key, andcount.
Where to go next
- Installation — install the packages you need.
- Quick Start — a 30-second example.
- Guide → Overview — the conceptual map.
- Integrations — file system, Vue, Vuelidate.