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.
