i18next

The internationalization framework for JavaScript, with zero runtime dependencies and a pluggable ecosystem for every environment.

Library
npm
v26.4.2
8,637 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
82 /100 Excellent
Development Activity 76
Maintenance 88
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
81 /100 Excellent
Architecture 88
Code Quality 85
Innovation 82
Learning Curve 70

i18next is a mature, widely-adopted internationalization (i18n) framework for JavaScript that provides everything needed to translate an application: pluralization, context, nesting, interpolation, and language detection. It runs in the browser, Node.js, Deno, and React Native, and ships with zero runtime dependencies, keeping it lightweight and portable across build targets.

What sets i18next apart is its plugin architecture: translation loading (backends), language detection, formatting, and post-processing are all pluggable via a single .use() API, letting teams swap in HTTP/filesystem backends, browser language detectors, or custom formatters without touching core code. A large companion ecosystem (react-i18next, i18next-http-backend, i18next-browser-languagedetector, and more) builds on this same interface, making it the default choice for internationalizing React, Vue, Angular, and vanilla JS projects alike.

What You Get

  • A t() translation function with key nesting, interpolation ({{variable}}), and context/pluralization support out of the box
  • A .use() plugin API for backends (HTTP, filesystem, in-memory), language detectors, formatters, and post-processors
  • Automatic language and namespace resolution with fallback chains, so missing translations degrade gracefully instead of breaking the UI
  • cloneInstance() and getFixedT() for multi-tenant/SSR apps that need isolated or namespace-scoped translator instances per request
  • First-class TypeScript definitions (hand-authored .d.ts/.d.mts) covering the full options and API surface, including typed selector-based key lookups

Common Use Cases

  • Translating a React, Vue, or Angular single-page app via the matching companion binding (react-i18next, vue-i18next, angular-i18next)
  • Server-side rendered apps that need a fresh, request-scoped translator instance (via cloneInstance) to avoid leaking state across requests
  • Loading translation JSON over HTTP or from the filesystem via i18next-http-backend / i18next-fs-backend, with lazy per-namespace loading
  • Detecting a visitor’s preferred language from the browser, cookies, or query string using i18next-browser-languagedetector
  • Applying locale-aware pluralization and number/date formatting through the built-in Formatter and PluralResolver modules

Under The Hood

Architecture The I18n class in src/i18next.js extends a small custom EventEmitter and owns instance lifecycle (init, changeLanguage, cloneInstance). On init() it wires up a set of single-responsibility services — LanguageUtils for locale-code resolution, PluralResolver for CLDR-style plural rules, Interpolator for {{var}}/nesting substitution, Formatter for value formatting, and BackendConnector (src/BackendConnector.js) which queues and dedupes async loads of translation resources per language/namespace pair. A Translator (src/Translator.js, the largest module at 645 lines) is the actual t() implementation: it resolves keys against the in-memory ResourceStore, triggers backend loads for missing namespaces, then pipes the result through interpolation, pluralization, and a registered postProcessor chain (e.g. sprintf-style formatting). Extension points (backend, languageDetector, i18nFormat, formatter, postProcessor, 3rdParty) are all registered through one .use(module) call keyed off a module.type string, which is what lets the ecosystem of companion packages plug into the same core without forking it. Tech Stack The package has zero runtime dependencies — package.json declares only an optional typescript peer dependency for consumers who want type-checking. Source is plain ES modules (no TS at the source level); the public API surface is instead hand-maintained in index.d.ts/index.d.mts (19KB), which is unusual for a package this size and signals deliberate API-surface control. The build pipeline uses Rollup (rollup.config.mjs) to emit CJS, ESM, and UMD bundles, with Babel handling syntax transforms for older test targets. Tests run on Vitest 4.x across three separate workspace configs (runtime, compatibility, typescript), the last of which uses @arktype/attest to assert inferred TypeScript types, not just runtime behavior. Code Quality The test/ directory holds 66 test files spanning interpolation, pluralization, backend concurrency, language detection, selector-based key access, and a dedicated security.test.js. Several non-trivial async races are documented inline with direct references to the originating GitHub issue numbers (e.g. the init/changeLanguage ordering fix referenced at src/i18next.js lines 214-216, and the selector-scoping logic at lines 406-419) — evidence of a codebase that has absorbed a decade of real-world edge cases rather than one written in a vacuum. Naming is consistent and each module (ResourceStore, LanguageUtils, BackendConnector) has a narrow, single responsibility, which keeps the 3,148-line src/ tree easy to navigate despite its age. API Design The .use().use().init({...}) chaining pattern is the standout DX decision: adding a backend and a language detector is two .use() calls before init(), and the same pattern is what every companion package (react-i18next, i18next-http-backend) targets, so the mental model transfers across the whole ecosystem. getFixedT(lng, ns, keyPrefix) gives callers a pre-scoped t function for a given namespace/language without re-passing options on every call, and hasLoadedNamespace() supports Suspense-style loading gates in frameworks like React. The trade-off is that a zero-dependency core means common needs (fetching translations over HTTP, detecting browser language) require pulling in a companion package rather than working out of the box, which adds a small amount of assembly for newcomers relative to a more batteries-included i18n library.

Used by 110 apps in this directory

TypeScript
80%
AGPL 3.0

massCode

Code Editors · Developer Tools · Productivity

7,003

A free, local-first developer workspace unifying snippets, notes, HTTP requests, calculations, drawings, and dev tools in one desktop app.

View details
87
Repo Health
87
Technical
63
Dependency
Built with
TypeScript 80%
Vue 19%
Updated 1 weeks ago
TypeScript
88%
MIT

medusa

Ecommerce

36,494

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
93
Repo Health
87
Technical
63
Dependency
Built with
TypeScript 88%
JavaScript 12%
Updated 2 weeks ago
Go
51%
MIT

memos

Note Taking

63,382

Open-source, self-hosted note-taking built for quick capture — Markdown-native, lightweight, and fully yours.

View details
91
Repo Health
78
Technical
65
Dependency
Built with
Go 51%
TypeScript 48%
Updated 1 weeks ago
TypeScript
42%
MIT

MentraOS

AI Development · Developer Tools

2,370

The open source operating system and SDK that lets developers build one app and run it across smart glasses from Even Realities, Vuzix, Mentra Live, and more.

View details
92
Repo Health
77
Technical
66
Dependency
Built with
TypeScript 42%
Java 20%
Kotlin 13%
Updated 1 weeks ago
Go
56%
Other

Multica

AI Assistants · AI Development

51,481

Turn coding agents into real teammates — assign issues, track progress, and compound reusable skills across a vendor-neutral, self-hosted platform.

View details
87
Repo Health
83
Technical
67
Dependency
Built with
Go 56%
TypeScript 38%
Updated 1 weeks ago
Go
95%
Other

NetBird

Security

29,568

Replace your VPN with a zero-trust WireGuard overlay network that auto-connects devices, enforces SSO and posture checks, and deploys in under 5 minutes.

View details
91
Repo Health
82
Technical
66
Dependency
Built with
Go 95%
Updated 1 weeks ago
TypeScript
99%
Other

NocoBase

Low Code Platforms · No Code Platforms

24,377

Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.

View details
94
Repo Health
81
Technical
63
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
TypeScript
98%
Other

Novu

Developer Tools

40,084

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 98%
Updated 1 weeks ago
Go
73%
Apache 2.0

ntfy

Developer Tools · Marketing

34,486

Send push notifications to your phone or desktop from any script or service using a single HTTP PUT or POST—no sign-up required.

View details
89
Repo Health
89
Technical
75
Dependency
Built with
Go 73%
JavaScript 26%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers