# General Translation Knowledge Base: What's the best i18n library for a React app?
URL: https://generaltranslation.com/en-US/kb/best-react-i18n-library.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Choose by how your team writes copy: gt-react for copy inline in JSX, Paraglide JS for typed message functions, react-i18next for JSON keys and i18next plugins, Lingui for PO catalogs, or React Intl for ICU MessageFormat. Each library renders translations; General Translation's CLI generates them before your build for gt-react, Paraglide JS, and react-i18next, with gt-react's JSX structure as context.
Category: Workflow Tools
Last updated: 2026-11-18
Authors: Jackie Chen
Published: 2026-10-16

How you write copy decides what a code review shows and what a translator sees. With copy inline in JSX, a pull request that changes a sentence shows the sentence; with keys, it shows a key and a separate catalog entry, and renaming or moving a component means keeping both in step. General Translation maintains two of the five libraries compared here, gt-react and Paraglide JS, and its CLI runs before your build, so new copy ships translated with the release that adds it.

Start with your rendering model. A browser-only React app, a server-rendered React app, and a Next.js App Router app have different setup requirements, and each library documents them separately.

## Video

The video is narrated in English, with English captions.

[What's the best i18n library for a React app?](https://caxecubb9c64cezv.public.blob.vercel-storage.com/films/v3/kb-best-react-i18n-library.mp4) (46 sec)

The four main React i18n libraries are `gt-react`, react-i18next, Lingui and React Intl. All four render and format translations, but only General Translation's `gt-react` also generates them, from copy written inline in your JSX. Wrap the copy in a `<T>` component, run `npx gt translate` before your build to write every target locale, or keep react-i18next and let the `gt` CLI translate its JSON files.

## How do the main React i18n libraries compare?

| Library | How you write copy | Translated by General Translation's CLI? | Plurals | Server rendering | Choose it when |
| --- | --- | --- | --- | --- | --- |
| gt-react (General Translation) | Inline JSX in [`<T>`](/docs/react/reference/components/t), strings with [`useGT`](/docs/react/reference/hooks/use-gt), optional automatic wrapping, or keyed dictionaries | Yes: [`gt translate`](/docs/cli/reference/commands/translate) generates them from each [`<T>`](/docs/react/reference/components/t) block, or your team writes them | [`<Plural>`](/docs/react/reference/components/plural) branches | [SSR setup](/docs/react/react-quickstart); [gt-next](/docs/react/nextjs-quickstart) for the App Router | You want readable copy in components and translations generated on each build |
| Paraglide JS (maintained by General Translation) | Messages in JSON files, called as typed functions such as `m.greeting()` | Yes: [`gt translate`](/docs/integrations/paraglide/quickstart) writes each locale's message file | [Variants](https://paraglidejs.com/variants) matched on CLDR plural categories | [Server middleware](https://paraglidejs.com/middleware); guides for TanStack Start, React Router, and Next.js webpack builds | You want typed message keys and per-message tree-shaking |
| react-i18next | Keys in JSON resources, with `Trans` for rich text | Yes: [`gt translate`](/docs/cli/guides/generating-translations) keeps i18next syntax intact; or your team or Locize | One key per plural form | [SSR guide](https://react.i18next.com/latest/ssr) | You already use i18next or need its plugins |
| Lingui | Inline macros or explicit IDs, extracted to PO catalogs | Translators or a TMS such as Crowdin fill the PO catalogs | ICU MessageFormat | [RSC integration](https://lingui.dev/tutorials/react-rsc) | You want an extract-and-compile catalog workflow |
| React Intl (FormatJS) | Message descriptors with IDs and default messages | Translators or a TMS fill the extracted JSON catalogs | ICU MessageFormat | [Next.js App Router guide](https://formatjs.github.io/docs/guides/nextjs-app-router) | Your team already works with FormatJS and ICU |

## What does the same button look like in react-i18next and gt-react?

With react-i18next, the copy lives in a resource file:

```json title="locales/en/translation.json"
{
  "settings": {
    "save": "Save changes"
  }
}
```

The component looks it up by key:

```tsx
import { useTranslation } from 'react-i18next';

export function SaveButton() {
  const { t } = useTranslation();
  return <button type="submit">{t('settings.save')}</button>;
}
```

Every other language needs its own resource file, which your team, a translation service, or General Translation's CLI fills in.

With gt-react, the copy stays in the component:

```tsx
import { T } from 'gt-react';

export function SaveButton() {
  return (
    <T>
      <button type="submit">Save changes</button>
    </T>
  );
}
```

Running [`gt translate`](/docs/cli/reference/commands/translate) before your build sends each [`<T>`](/docs/react/reference/components/t) block, with its element structure, to General Translation and writes a translation for every target locale. A copy edit shows up in the component diff, and the next run translates it again.

## gt-react: copy in JSX, translations generated

gt-react keeps source copy in the component. Wrap JSX in [`<T>`](/docs/react/reference/components/t), and use [`useGT`](/docs/react/reference/hooks/use-gt) where an API needs a string, such as an input's `placeholder`. For rich text, keep the sentence and its inline elements in one [`<T>`](/docs/react/reference/components/t) block so they're translated together, and add a [`context` prop](/docs/react/reference/components/t#context) when the wording alone is ambiguous.

For an app with a lot of unmarked JSX, [automatic JSX injection](/docs/cli/guides/using-auto-jsx) adds the translation wrappers for you at build time. Set `enableAutoJsxInjection` under `files.gt.parsingFlags` in `gt.config.json` and add `@generaltranslation/compiler` to your bundler. It works in React SPAs, server-rendered React apps, and Next.js webpack builds, and leaves existing [`<T>`](/docs/react/reference/components/t) blocks alone. Check the extracted text, dynamic values, and rich-text grouping on a few screens before enabling it across the app.

gt-react is [MIT-licensed](https://github.com/generaltranslation/gt) and built on General Translation's own ICU and formatting packages, not on another i18n library. It renders [bundled translations](/docs/react/guides/storing-translations) without a General Translation account or runtime requests. When General Translation generates the translations, reviewers can correct them in the [Translation Editor](/docs/platform/dashboard/guides/reviewing-translations).

Setup differs by rendering model: use the [React SPA quickstart](/docs/react/react-spa-quickstart) for browser-only apps, the [React quickstart](/docs/react/react-quickstart) for server-rendered apps, and [gt-next](/docs/react/nextjs-quickstart) for Next.js.

**Choose gt-react** when you want copy reviewable in component diffs, translations generated as part of your build, or automatic wrapping to localize an existing app quickly.

## Paraglide JS: typed message functions

[Paraglide JS](https://paraglidejs.com/react) is a compiler-first i18n library, [maintained by General Translation](/blog/paraglide-js) and MIT-licensed. You keep messages in JSON files in the inlang message format, and its compiler turns each one into a typed function that you import and call, such as `m.greeting({ name })`. Your editor autocompletes message keys and parameters, and your bundler drops message functions your code never references. It works in any Vite app and has guides for TanStack Start, React Router, and Next.js webpack builds.

Paraglide renders the translations in your message files. For projects that use its default inlang message format, General Translation's CLI [translates those files](/kb/general-translation-vs-paraglide) and writes one for each target locale, with your Glossary and Custom Prompts applied. The inlang CLI's machine translation and the Fink editor are other options.

**Choose Paraglide JS** when you want typed message keys and per-message tree-shaking, or you already have Paraglide message files.

## react-i18next: the i18next ecosystem

[react-i18next](https://react.i18next.com/) connects React to i18next, the most widely used JavaScript i18n framework. Its hooks render messages from JSON resources, and its `Trans` component handles text that contains React elements.

The [i18next plugin ecosystem](https://www.i18next.com/overview/plugins-and-utils) includes translation-loading backends, language detectors, and extraction tools, and the official CLI handles extraction, locale synchronization, and TypeScript type generation. i18next also supports [source text as keys](https://www.i18next.com/principles/fallback), though its documentation warns this makes copy changes harder to coordinate with translations.

react-i18next doesn't translate your resources. Translations come from your team or a service; the i18next team documents a [Locize workflow](https://react.i18next.com/guides/multiple-translation-files). The `gt` CLI can also [translate react-i18next JSON files](/docs/cli/guides/generating-translations) without a migration.

**Choose react-i18next** when you already have i18next resources, or need its plugins for loading and language detection.

## Lingui: extract and compile catalogs

[Lingui](https://lingui.dev/introduction) lets you write messages inline with macros, extract them into catalogs, translate them, and compile the result for the app. It supports generated and explicit message IDs, with PO as the default catalog format. Its [React tutorial](https://lingui.dev/tutorials/react) covers the full cycle, and Server Component apps have a [dedicated integration](https://lingui.dev/tutorials/react-rsc).

Lingui keeps copy near the UI, but your team owns every step after extraction: translation, review, compilation, and loading. Extraction finds new messages; it doesn't translate them.

**Choose Lingui** when your translators or translation service work with PO catalogs and you want Lingui's extraction and compiler tooling.

## React Intl: FormatJS and ICU MessageFormat

[React Intl](https://formatjs.github.io/docs/react-intl/) is FormatJS's React library for messages, plurals, dates, and numbers. [Message descriptors](https://formatjs.github.io/docs/react-intl/api/) identify each message by ID, with an optional default message and a description for translators. [FormatJS extraction](https://formatjs.github.io/docs/getting-started/message-extraction/) collects them and can generate the IDs.

Messages use [ICU MessageFormat](https://formatjs.github.io/docs/core-concepts/icu-syntax/), so reviewers need to read its placeholder and plural syntax, and your pipeline supplies the translated catalogs. Server rendering and client boundaries vary by framework, so check your framework's integration before adopting it.

**Choose React Intl** when your team already uses FormatJS or wants ICU MessageFormat throughout.

## How should you test a React i18n library before choosing?

Pick one feature with a heading, a named variable, a plural count, an accessible input label, and a formatted price. Localize it into two languages with each candidate, then change a source sentence and add a new message. Compare:

1. **Authoring:** Can a reviewer understand the copy and its context in the diff?
2. **Translation:** How does new or changed text reach whoever translates it?
3. **Verification:** Can you catch missing messages and broken variables before release?
4. **Delivery:** Which files or services must be available when the production app renders?

If your current library wins, keep it; choosing how to author copy doesn't lock in how it gets translated. Before you ship, run the [multilingual app launch checklist](/kb/multilingual-app-launch-checklist).

General Translation is used by developer teams at Cursor, Ramp, Profound, Cognition, Sierra, and ClickHouse. To try it, start with the [React quickstart](/docs/react/react-quickstart).

## Common questions

### Which React i18n library translates my app automatically?

The libraries render translations; General Translation's CLI generates them. [`gt translate`](/docs/cli/reference/commands/translate) writes translations for gt-react, for Paraglide JS message files, and for react-i18next JSON resources. With gt-react, it translates each [`<T>`](/docs/react/reference/components/t) block with its element structure as context.

### Which React i18n library do most developers use?

react-i18next, by a wide margin: it had [26,060,113](https://api.npmjs.org/downloads/point/2026-11-09:2026-11-15/react-i18next) npm downloads in the week of November 9–15, 2026, more than `next-intl`, `react-intl`, `@lingui/core`, `@inlang/paraglide-js`, and `gt-react` combined. `next-intl` is for Next.js only, and Paraglide's count covers every framework it supports. Downloads are a popularity indicator, not a count of users or production apps. For a new project, choose gt-react to keep copy in JSX or Paraglide JS for typed keys; General Translation's CLI translates either. The [localization software guide](/kb/best-localization-software#what-are-the-most-popular-open-source-i18n-frameworks) compares the broader set of frameworks.

### Which React i18n library has the best TypeScript support?

Paraglide JS generates a typed function for each message, so a misspelled key or a missing parameter is a TypeScript error. react-i18next type-checks keys after you declare your resources in a [TypeScript declaration file](https://www.i18next.com/overview/typescript). With gt-react's [`<T>`](/docs/react/reference/components/t), there are no message keys to mistype, because copy is written inline in JSX.

### Is react-i18next or React Intl better?

Neither is better in general. react-i18next suits teams that want JSON resources and i18next's plugins. React Intl suits teams standardized on FormatJS and ICU MessageFormat. Both leave translation to your team or a separate service.

### Which i18n library supports Next.js Server Components?

For Next.js App Router apps, [gt-next](/docs/react/nextjs-quickstart) supports Server and Client Components: use [`<T>`](/docs/react/reference/components/t) and [`useGT`](/docs/react/reference/hooks/use-gt) in Server Components and [`getGT`](/docs/react/nextjs/reference/functions/get-gt) in async ones. Profound localizes its main product, a Next.js App Router app, with General Translation, and [adding i18n to a Next.js App Router app](/kb/add-i18n-to-nextjs) walks through the setup. next-intl is the other common App Router choice; [next-intl vs. gt-next](/kb/next-intl-vs-gt-next) compares them. Lingui has a [dedicated RSC integration](https://lingui.dev/tutorials/react-rsc), and Paraglide JS works in the App Router with its [webpack plugin](https://paraglidejs.com/next-js).

### How do I move from an in-house i18n setup to a library?

You can keep your JSON dictionary and have General Translation's CLI translate it before changing any code. Then pick the library whose authoring style matches your code: keyed dictionaries map onto react-i18next or [gt-react's dictionaries](/docs/react/guides/translating-with-dictionaries), and strings written in components map onto gt-react's [`<T>`](/docs/react/reference/components/t). [Building your own i18n vs. using General Translation](/kb/general-translation-vs-in-house-i18n) covers what you stop maintaining.

### Can I use General Translation without leaving react-i18next?

Yes. When your `package.json` declares `i18next` directly, the `gt` CLI detects it and translates your react-i18next JSON resources while preserving their syntax. See [Generating translations](/docs/cli/guides/generating-translations). Paraglide JS projects can keep Paraglide the same way; see [translating Paraglide JS messages](/kb/general-translation-vs-paraglide).

### Do I still need JSON translation files with gt-react?

Not as source files. You write copy inline, and translations are generated as files in your build or served from General Translation's CDN. See [i18n without translation files](/kb/i18n-without-translation-files).

## Key takeaways

- gt-react, Paraglide JS, react-i18next, Lingui, and React Intl all render translations in React; the choice comes down to how your team writes copy.
- General Translation maintains gt-react and Paraglide JS, and its CLI generates translations for both and for react-i18next resources.
- gt-react keeps copy inline in JSX and can wrap existing JSX automatically at build time. Paraglide JS compiles messages into typed functions that bundlers can tree-shake.
- Lingui and React Intl rely on catalogs that your team or a translation service fills in.

## Related questions

- [General Translation vs. i18next, react-intl, and next-intl: which i18n library should you use?](https://generaltranslation.com/en-US/kb/general-translation-vs-i18n-libraries.mdx): Open-source libraries such as i18next, react-intl, and next-intl don't translate anything. They display translations you supply in a catalog file for each language, written by you, your translators, or a separate service. General Translation's libraries are open source too and do the same job, and General Translation also does the translating, with your code as context.
- [How do I translate Paraglide JS messages?](https://generaltranslation.com/en-US/kb/general-translation-vs-paraglide.mdx): Keep Paraglide JS, which General Translation now maintains, and use General Translation's CLI to translate its message files. Each run writes a file for each target locale with keys, placeholders, and variant structure intact, applies your Glossary and Custom Prompts, and translates new and changed messages before your build. Your components and Paraglide setup stay unchanged.
- [next-intl alternatives: gt-next vs. next-intl](https://generaltranslation.com/en-US/kb/next-intl-vs-gt-next.mdx): next-intl renders translations you supply in a message catalog for each language. gt-next renders translations too, and General Translation also generates them from copy written inline in your JSX. Both are MIT-licensed and support the App Router and Server Components. If your next-intl catalogs already work, you can keep them and use General Translation to translate them without migrating.
- [Should you build your own i18n or use General Translation?](https://generaltranslation.com/en-US/kb/general-translation-vs-in-house-i18n.mdx): Hand-rolled i18n (a dictionary per language and a small t() helper) is fine for one or two languages and a little copy. As an app grows, you rebuild plural rules, fallbacks, and file syncing, and you still need to produce translations. General Translation's open-source libraries handle rendering, and General Translation generates and updates translations from your code.
- [How do I handle plurals in React?](https://generaltranslation.com/en-US/kb/how-to-handle-plurals-in-react.mdx): Handle plurals in React by giving each language one sentence per plural form and picking it with that language's plural rules, since English has 2 forms, Russian has 4, and Arabic has 6. General Translation's `<Plural>` component in gt-react and gt-next takes your source forms, and General Translation generates the forms each target language needs.

## Previous and next questions

- Previous question: [Transifex alternatives: General Translation vs. Transifex](https://generaltranslation.com/en-US/kb/general-translation-vs-transifex.mdx)
- Next question: [How do I detect a user's browser language?](https://generaltranslation.com/en-US/kb/detect-user-language.mdx)

## Sitemap

See the [Knowledge Base sitemap](https://generaltranslation.com/en-US/kb/sitemap.md) for every article.
