Skip to main content
Lingui

Internationalization Framework for Global Products

Lingui is a lightweight, open-source internationalization (i18n) library for JavaScript and TypeScript. It brings compile-time macros and a CLI for message extraction to React, React Native, Vue, SolidJS, Astro, Svelte, and Node.js.

Why choose Lingui for your localization projects?

Image

Universal

Image

Powerful Tooling

Image

Full Rich-Text Support

Image

Headache-Free Localization

Image

Built for AI-Assisted Workflows

Image

Battle-Proven & Future-Proof

Image

Suitable for All Localization Platforms

Image

Verified by Thousands of Developers

Image

Fully Fledged

Workflow

Define Messages

Write messages directly in your codebase using Lingui's components.

<p>
<Trans>Hello {name}!</Trans>
</p>

Extract

Use the Lingui CLI to extract all translation keys from your codebase and create or update message catalogs.

#: src/App.tsx:24
msgid "Hello {name}!"
msgstr "Hello {name}!"

Translate

Translate your message catalogs either manually or through integration with translation tools.

#: src/App.tsx:24
msgid "Hello {name}!"
msgstr "Ahoj {name}!"

Compile

Use the Lingui CLI to compile your message catalogs into a format that can be used in your application.

module.exports = {
messages: JSON.parse("...")
};

Deploy

Include the compiled message catalogs in your production build.

Integrating Lingui into your project is easy!

import { Trans } from "@lingui/react/macro"

function App() {
return (
<Trans
comment="Docs link on the website"
>
Read the <a href="https://lingui.dev">documentation</a>
for more info.
</Trans>
)
}
Use the Trans component to wrap translatable content.

Macros Reference

Frequently asked questions

Does Lingui work with the Next.js App Router and React Server Components?

How do I translate strings outside a React component, for example in constants or validation schemas?

Why do translations work in development but show message IDs in production?

Can I use Lingui without React, for example in Node.js, Vue or Svelte?

How do I load only the active language's catalog instead of bundling every locale?

Does Lingui work with React Native and Expo?

Ready to localize your app?

Start with the docs, automate message extraction, and deliver translations with tools that fit your existing stack.