Paraglide JS

Paraglide compiles source translations into typed JavaScript functions. i18next and React Intl resolve messages through runtime APIs, with catalog delivery configured by your app. Choose based on your translation workflow, loading strategy, and framework integration.

For a new React app, start with choosing a React + Vite i18n library. For a focused migration comparison, read Paraglide vs react-i18next. The benchmark measures configured applications, including both bundled and HTTP-loaded i18next.

Messages, types, and production loading

CapabilityParaglide JSi18nextReact Intl / FormatJS
Message accessGenerated function callsRuntime dictionary lookupRuntime formatting APIs and React components
Unused-message removalStatic references let the bundler remove unused message functionsCatalog size depends on resource and namespace loadingCatalog size depends on supplied messages and application splitting
Default locale deliveryRetained messages include configured localesBundle or load languages/namespacesApplication supplies messages for the active locale
Typed message IDsGenerated from source messagesTyped resources and selector APIConfigurable typed IDs
Typed interpolation parametersGenerated message signaturesInference depends on resource declarations and configurationCheck the typed-message APIs for your version and resource setup
Plurals and selectionVariants, including plural categoriesPlurals and contextICU MessageFormat
Rich text in ReactTyped markup adapterTrans componentRich-text formatting
Translation changes after deploymentCompiled message changes require build/deploymentRuntime resources can be updated independentlyApp can supply updated messages at runtime
Translation workflowGeneral Translation through the inlang CLI (recommended), or the Fink editor, translate the message filesJSON resources can be translated in any tool that reads them; Locize is i18next's commercial translation-management partnerThe FormatJS CLI extracts messages for a translation management system and compiles the translated files

Typed IDs, generated parameter contracts, and runtime validation are different guarantees. All depend on your application's checking and delivery setup. Runtime lookup does not require bundling all languages or every catalog entry.

Why fewer bytes can still render later

A catalog discovered only after app startup adds a serial dependency:

Download app JavaScript → execute/initialize app → discover catalog URL → fetch catalog → render translated UI

Paraglide's statically imported message functions let bundlers discover translations at build time and bundle or preload them with app code. Fetches can overlap instead of waiting for runtime catalog discovery. A smaller, later-starting catalog can therefore delay translated UI more than a larger, earlier-starting bundle. See Don't Lazy-Load Translations for the loading-waterfall rationale.

Other libraries can also bundle or preload catalogs. This advantage depends on delivery configuration; it does not prove every runtime library is slower. It is separate from unused-message tree-shaking and active-locale loading, and the benchmark does not isolate each mechanism's contribution.

Routing and framework integration

Paraglide provides locale detection strategies, localized URL helpers, and middleware for request-scoped SSR. Follow the maintained TanStack Start, SvelteKit, or React Router integration for your framework. Plain message functions also work outside React.

i18next has framework bindings and server middleware; React Intl supplies React formatting APIs. Compose locale routing and request isolation with your framework rather than sharing mutable locale state across concurrent SSR requests. See each integration's SSR instructions.

Paraglide's standard locale switch performs document navigation. react-i18next can update a running React tree through changeLanguage(), while React Intl receives locale and messages through its provider. If preserving in-memory UI state across language changes is essential, include that requirement in your evaluation.

Tree-shaking and active-locale loading

Unused-message tree-shaking removes message functions your application does not reference. Active-locale loading avoids delivering translations for other languages. One does not prove the other.

Default Paraglide output includes configured locales for each retained message. Per-locale builds are the recommended approach for shipping only the active locale, with additional deployment and framework constraints. There is no universal threshold such as “20 locales” at which a loading strategy becomes better: message usage, compression, caching, and route splitting all matter.

The benchmark shows cases where HTTP i18next transfers fewer bytes while Paraglide reaches translated DOM readiness sooner. Read the conditions and measured losses as well as the wins. These client-rendered Vite measurements do not establish SSR, React rendering, or cross-device performance.

To verify unused-message removal yourself, run the tree-shaking probe. Generated files are Git-ignored by default; compilation is part of dev/build rather than a required generated-file commit before each push.

Further Reading

Try a representative production build

Use your actual catalogs, routes, locale count, rich text, and deployment target. Check translated content, language switching, generated types, initial transfer, and subsequent navigation before selecting a library.

React + Vite guide · Build workflow and CI · Benchmark and reproduction