# General Translation Knowledge Base: How do I translate Paraglide JS messages?
URL: https://generaltranslation.com/en-US/kb/general-translation-vs-paraglide.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 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.
Category: Internationalization
Last updated: 2026-11-16
Authors: Kevin Wu, Jackie Chen
Published: 2026-10-16

Paraglide JS is a compiler-first i18n library. A Paraglide project is configured in `project.inlang/settings.json`, and its messages live in JSON files in the inlang message format, such as `messages/en.json`. The compiler turns each message into a typed function that you call as `m.greeting({ name })`, so your bundler can drop the messages a page never uses. [Paraglide JS joined General Translation](/blog/paraglide-js) in November 2026, with about 3.9M monthly npm downloads at the time, and stays free and open source under the MIT license. Paraglide renders your messages in each language; producing the translations for every locale's file is a separate step.

## Video

The video is narrated in English, with English captions.

[General Translation vs. Paraglide JS: which should you use?](https://caxecubb9c64cezv.public.blob.vercel-storage.com/films/v3/kb-general-translation-vs-paraglide.mp4) (42 sec)

General Translation keeps copy inline and generates translations with the structure of your React components, shared terminology, and Dashboard review; Paraglide JS compiles your catalogs into typed, tree-shakable message functions. Write copy inside a `<T>` component, run `npx gt translate` before the build, review the results in the Dashboard, and let Locadex open translation pull requests as your code changes.

## What does Paraglide JS do well?

- **Type safety.** Message keys and parameters are generated types, so a misspelled message or a missing parameter is a TypeScript error.
- **Bundle size.** Messages compile to ES modules, so unused ones are tree-shaken. Its [benchmark](https://paraglidejs.com/benchmark) compares translated render time and transfer size against bundled and HTTP-loaded i18next across locale and catalog sizes.
- **Plurals, variants, and markup.** The inlang message format declares [variants](https://paraglidejs.com/variants), such as plurals matched on CLDR categories, and [markup](https://paraglidejs.com/markup) for links and emphasis inside a message.
- **Locale strategies.** An ordered [`strategy` list](https://paraglidejs.com/strategy) resolves the locale from the URL, a cookie, the browser's preferred language, and other sources, and [server middleware](https://paraglidejs.com/middleware) handles localized routes.
- **Framework reach.** Paraglide [works with any Vite app](https://paraglidejs.com/vite), including React, Vue, Svelte, and Solid, and has guides for SvelteKit, TanStack Start, React Router, Astro, and Next.js. It's the [Svelte CLI's i18n add-on](https://svelte.dev/docs/cli/paraglide).

## How can I translate Paraglide messages?

| Approach | How it works | Use it for |
| --- | --- | --- |
| General Translation's CLI | [`npx gt translate`](/docs/cli/reference/commands/translate) writes each target locale's message file, with your Glossary and Custom Prompts | Translating every message and keeping files current as your app changes |
| inlang CLI | `npx @inlang/cli machine translate` fills missing translations with a free, community-operated service, or with your own provider key | Quick drafts of missing messages |
| Fink | inlang's browser editor, where translators and reviewers edit messages | Review and edits by translators who don't work in the repository |
| By hand | Edit each locale's message file and rebuild | A few messages |

The approaches combine: for example, translate with General Translation, then have reviewers check the results in Fink. Paraglide's own [translating messages guide](https://paraglidejs.com/translating-messages) recommends General Translation for translating message files and keeping them updated.

## How does General Translation translate Paraglide messages?

General Translation's [Paraglide JS integration](/docs/integrations/paraglide/quickstart) works with projects that use Paraglide's default inlang message format (`plugin.inlang.messageFormat` in `project.inlang/settings.json`). After you set up the CLI with [`gt init`](/docs/cli/reference/commands/init) and add the rule the quickstart has you add to `gt.config.json`, [`npx gt translate`](/docs/cli/reference/commands/translate) reads your base-locale file and writes a file for each target locale next to it. Paraglide compiles each one, such as `messages/de.json`, into the same typed functions:

```json title="messages/de.json"
{
  "$schema": "https://inlang.com/schema/inlang-message-format",
  "title": "Willkommen zurück, {name}!",
  "nav": {
    "account": {
      "settings": "Einstellungen",
      "sign_out": "Abmelden"
    }
  }
}
```

- **Only the text is translated.** Message keys, placeholders such as `{name}`, markup, nested message objects, and the declarations and selectors of variants keep their structure, through that rule.
- **Shared terminology and tone.** Each run applies the Glossary and Custom Prompts in the [Context Groups](/docs/platform/dashboard/guides/defining-context-for-translations) assigned to your project, so product names stay consistent across your app, docs, and marketing projects.
- **Your edits are kept.** With [`saveLocal`](/docs/cli/reference/config#save-local), edits you make to translated text are kept on later runs.
- **Your code stays the same.** The CLI writes your message files and a `gt-lock.json`; your components keep calling `m.*` functions, and `npx @inlang/cli check` validates the translated files as before.

General Translation bills translation by usage ([pricing](https://generaltranslation.com/pricing)), and a free Organization draws from a rolling allowance of platform credits, so you can start without a payment method.

## Should I use Paraglide JS or gt-react and gt-next?

General Translation also maintains `gt-react` and `gt-next`. The choice comes down to how your team writes copy and which frameworks you use, and General Translation translates either one. Here's the same greeting in each:

```json title="messages/en.json"
{
  "greeting": "Hello, {name}!"
}
```

```tsx title="Paraglide JS"
import { m } from './paraglide/messages.js';

export const Greeting = ({ name }: { name: string }) => <p>{m.greeting({ name })}</p>;
```

```tsx title="gt-react"
import { T, Var } from 'gt-react';

export const Greeting = ({ name }: { name: string }) => (
  <T>
    <p>Hello, <Var>{name}</Var>!</p>
  </T>
);
```

| Feature | Paraglide JS | `gt-react` and `gt-next` |
| --- | --- | --- |
| How you write copy | Keys in a JSON message file, called as `m.key()` | JSX inside [`<T>`](/docs/react/reference/components/t) in the component, with no keys |
| Type safety | Generated types for every message and parameter | No message key to mistype |
| Bundle | Unused messages tree-shaken; by default each kept message includes every configured locale (per-locale builds available) | Translations load per locale |
| Frameworks | Any Vite app, SvelteKit, TanStack Start, React Router, Astro, Next.js (webpack plugin) | React and Next.js, with more [SDKs](/docs/overview/get-started) for other stacks |
| How translations are produced | General Translation's CLI translates the message files | General Translation's CLI translates each marked JSX block with its element structure |

Use Paraglide JS when you want typed message functions, per-message tree-shaking, or a framework beyond React, such as SvelteKit or Solid. Use `gt-react` or `gt-next` when you want copy to stay readable in your components, or when you want [Locadex](/kb/what-is-locadex) to wrap new UI text in your React or Next.js app.

## How do I add General Translation to an existing Paraglide project?

Keep Paraglide and add the CLI next to it:

1. Install `gt` as a development dependency and run [`gt init`](/docs/cli/reference/commands/init) with `--no-react-setup` and your message file pattern, so setup leaves your app's code alone.
2. Add the quickstart's rule for inlang message files to `gt.config.json`.
3. Commit your message files, then run [`npx gt translate`](/docs/cli/reference/commands/translate). The first run writes each target file from your source messages, so review the diff and restore the existing translations you want to keep.
4. Run the same command in CI before your build, with a project API key, so new and changed messages are translated on each push. (See [How do I keep translations up to date on every deploy?](/kb/translations-in-ci))

## Related questions

- [How do I add i18n to TanStack Start?](https://generaltranslation.com/en-US/kb/add-i18n-to-tanstack-start.mdx): TanStack Start has no built-in i18n, so you add a library that resolves the locale for each server request and loads messages before render. Use Paraglide JS, the library TanStack's i18n guide recommends, which General Translation maintains, and have General Translation's CLI translate its message files. General Translation's experimental gt-tanstack-start keeps copy inline in JSX instead.
- [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 keep translations up to date on every deploy?](https://generaltranslation.com/en-US/kb/translations-in-ci.mdx): Run translation as a pipeline step before each production build, so new copy ships translated with the deploy that adds it. General Translation's gt CLI does this with npx gt translate, using a project API key and project ID stored as CI secrets.
- [How do I translate i18n JSON files?](https://generaltranslation.com/en-US/kb/translate-json-files.mdx): Translate only the string values in a JSON locale file. Keep nonplural keys, placeholders such as {{name}}, and tags unchanged, but expect plural keys to differ by language: Polish needs inbox_few and inbox_many. Use a format-aware tool or API, then parse and validate the output before review.
- [What's the best i18n library for a React app?](https://generaltranslation.com/en-US/kb/best-react-i18n-library.mdx): 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.

## Previous and next questions

- Previous question: [Google Translate alternatives: General Translation vs. Google Translate](https://generaltranslation.com/en-US/kb/general-translation-vs-google-translate.mdx)
- Next question: [i18next alternatives: General Translation vs. i18next](https://generaltranslation.com/en-US/kb/general-translation-vs-i18next.mdx)

## Sitemap

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