v2.0 • Utils • 4kb gzipped • MIT
IntlKit
A translation runtime with plurals, interpolation and lazy locale loading.

// why intlkit
Plurals done properly
Uses the plural rules the browser already ships, so Polish and Arabic behave correctly without a special case in your code.
// stack
Lazy locales
Only the active locale is fetched, and switching one loads the next on demand.
IntlKit started as a single file in a client project and stayed small on purpose. It does one job, it does it in 4kb gzipped, and it has no runtime dependencies.
Getting started
Install it, import it, call it:
npm i intlkit-js
Uses the plural rules the browser already ships, so Polish and Arabic behave correctly without a special case in your code.
What it does not do
It does not manage your state, style your components or ship a plugin system. Those are your decisions, and keeping them out is what keeps the bundle honest.
- Correct plural categories
- Per-route message splitting
- MIT licensed, commercially friendly
Features
Correct plural categories
All six CLDR categories, resolved by the platform rather than an if statement.
Per-route message splitting
Message catalogs split alongside your route bundles.
ESM and types
Ships module and CommonJS builds with hand-written type definitions and source maps.
Tree-shakes cleanly
Every export is side-effect free, so importing one function costs one function.
Tested to the edges
Ninety-eight percent branch coverage, with the awkward cases written first.
Node and browser
One build runs in both, with no conditional exports to get wrong.
Get IntlKit v2.0
5 files • .min.js 4kb • .zip 68kb • sha384 verified
Changelog
- Per-route message splitting
- Nested interpolation support
- Missing-key reporter for development
- Type definitions rewritten by hand
- Dropped the last runtime dependency
- Safari 16 compatibility fixes
- Bundle size reduced by eleven percent
// related
Related products
ChartForge
Canvas charts in twelve lines. Responsive, accessible and dark-mode ready, with no D3 learning curve.
View →MotionEase
Physics-based micro-animations with a single call. Spring curves that feel right without a tuning session.
View →FormFlow
Validation and multi-step logic that works the same in React, Vue and vanilla. Your markup stays yours.
View →Drop it in this afternoon.
MIT licensed. Commercial friendly. Five-minute setup.