js-lingui is an internationalization library for JavaScript that brings compile-time macros and message extraction to React, React Native, Vue, SolidJS, Astro, Svelte, and Node.js.
The library solves the friction of key-based i18n by keeping translatable text inline with the code that uses it, rather than requiring developers to invent message keys and maintain separate JSON files. Text wrapped in the Trans macro stays readable in source code and diffs, while a CLI extraction step automatically generates PO catalogs from the source without manual bookkeeping. Catalogs are compiled ahead of time into optimized runtime output, eliminating the need to ship a MessageFormat parser to the browser. Rich text and React components embed naturally within messages, with translators seeing numbered tags instead of markup.
Lingui suits projects where readable source code and translator experience matter, particularly React applications and frameworks with build-time compilation. The tool's approach differs from key-based libraries by eliminating the disconnect between code and translation files, and it differs from runtime-parsed solutions by compiling messages at build time to keep the core bundle small. Teams should adopt it if they value keeping copy visible in code reviews and want stable message IDs generated automatically rather than managed manually.
Almost all open issues are raised by outside users rather than the core team, indicating a substantial base of adopters reporting real-world use. Maintainers typically respond to new issues and pull requests within a day. Work in the issue tracker is dominated by bug reports, documentation improvements, and triage tasks requiring reproduction steps.