Paraglide JS works with the Next.js App Router. The examples below use Next.js 16.4.0 and Paraglide JS 2.27.0.
Choose the setup that matches your application:
| Setup | Public URLs | Rendering |
|---|---|---|
| SSR | /, /de, /de/subpage | Prerendered locale shells with request-time content inside Suspense; Cache Components and Partial Prefetching enabled |
| SSG | /en, /de | Localized pages generated at build time; no proxy required |
Both setups use a [locale] root layout, await route parameters, and pass the locale explicitly to message functions and client components. This keeps server rendering, hydration, and client locale navigation consistent. The Webpack plugin requires --webpack for development and builds.
Usage
Continue passing the resolved route locale with m.example_message(inputs, { locale }) when translating on the server or in client components rendered by the server. See the basics documentation for message parameters and locale management.
Translate your messages
Paraglide compiles whatever is in your message files, such as messages/de.json. To translate them, we recommend General Translation, which maintains Paraglide JS. Choose it when the inlang CLI asks for a translation provider:
npx @inlang/cli machine translate --project ./project.inlang
See Translating messages for sign-in, coding agents, CI and other options.
