Introduction
📖 A readable, automated, and optimized internationalization for JavaScript
Internationalization is the design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language.
Key Features​
Lingui is an easy yet powerful internationalization framework for global projects.
Clean and Readable​
Keep your code clean and readable, while the library uses battle-tested and powerful ICU MessageFormat under the hood.
Universal​
Use it everywhere. @lingui/core
provides the essential intl functionality which works in any JavaScript project, while @lingui/react
offers components for leveraging React rendering, including React Server Components (RSC) support.
Full Rich-text Support​
Seamlessly use React components within localized messages, without any restrictions. Creating rich-text messages feels just like writing JSX.
Powerful Tooling​
Manage your intl workflow with the Lingui CLI, Vite Plugin, and ESLint Plugin. The CLI extracts, compiles and validates messages, while the Vite plugin compiles catalogs on the fly, and the ESLint plugin helps catch common usage errors.
Unopinionated​
Integrate Lingui into your existing workflow. It supports explicit message keys as well as auto-generated ones. Translations are stored either in JSON or standard PO file, which is supported in almost all translation tools.
Lightweight and Optimized​
Core library is less than 3 kB gzipped, React components are additional 1.4 kB gzipped.
AI Translations Ready​
For AI to do great translations for you, context is critical. Translating UI copy is difficult because it's usually a list of short strings without enough context. Lingui's localization formats allow developers to write descriptions of where and how your keys are used. This allows both human translators and AI to make better translations.
Active Community​
Join the growing community of developers who are using Lingui to build global products.
Workflow​
Using Lingui for internationalization is a straightforward process. Here's a high-level overview of the workflow.
Define Messages​
Write messages directly in your codebase using Lingui's components. This keeps your code clean and readable while embedding translations naturally.
Extract​
Use the Lingui CLI to extract all translatable messages from your codebase and create or update message catalogs. This step ensures that all messages are captured and ready for translation.