li18n
Simple, type-safe i18n for TypeScript. Define your messages in JSON, get fully-typed TypeScript functions out. No runtime parsing, no stringly-typed keys.
Define your messages in JSON, get fully-typed TypeScript functions out. No runtime parsing, no stringly-typed keys.
Fully Typed
Every message key becomes a typed TypeScript function. Variables and conditionals are reflected in the function signature - caught at compile time, not runtime.
Conditionals & Pluralization
Boolean, string, and number conditionals with case-based dispatch. Number cases support JS comparison operators for pluralization.
Async-Safe Locale Scoping
Built-in AsyncLocalStorage support via withLocale() - isolate locale per-request in servers and Discord bots without global state collisions.