Skip to content

Waku i18n · React Server Components

Waku i18n across React Server and Client Components.

Palamedes keeps translation state aligned across Waku's React Server Component tree and its hydrated client islands. A Vite adapter transforms messages; the shared runtime resolves the active catalog on the correct side of the boundary.

Build integration
@palamedes/vite-plugin

Configured inside Waku's Vite plugin surface.

Verified against
Waku 1 beta

React 19 Server Components on beta.6.

Rendering
RSC + islands

Server-first pages with hydrated client boundaries.

Locale models
4 examples

Cookie, route, subdomain, and top-level domain.

npm package@palamedes/wakuv1.17.3677 downloads / month

01 — The framework problem

RSC moves the translation boundary before the traditional client application starts.

Waku begins with a Server Component tree, then introduces client boundaries only where interactivity is needed. Locale state must be available in both environments without shipping server machinery to the browser or rendering two languages during hydration.

02 — The Palamedes model

Treat the server and client as two hosts of one compiled message model.

Palamedes keeps the environment-specific activation explicit while sharing authoring, catalogs, ICU semantics, and diagnostics across the RSC boundary.

Waku-native Vite composition

Add the Palamedes transform through Waku's vite.plugins configuration beside the React plugin already used by the application.

Server-first activation

Resolve the request locale and activate a fresh i18n instance before the Server Component page calls t or Trans.

Small client boundaries

Only interactive islands load the React client helpers. Server-rendered translated content does not require turning the whole page into a Client Component.

03 — In TypeScript

Palamedes joins Waku's Vite pipeline without changing the RSC page model.

waku.config.ts + pages/[locale].tsx

// waku.config.ts
import react from "@vitejs/plugin-react"
import { defineConfig } from "waku/config"
import { palamedes } from "@palamedes/vite-plugin"

export default defineConfig({
  vite: {
    plugins: [
      palamedes(),
      react(),
    ],
  },
})

// pages/[locale].tsx — a Server Component
import { t } from "@palamedes/core/macro"

export default async function LocalePage() {
  return <h1>{t`Welcome to Palamedes`}</h1>
}

The checked example resolves and activates the request locale before rendering this page, then initializes only the interactive client components with the same catalog.

04 — Locale strategy

Choose the URL model that fits your Waku product.

Waku decides how pages map to URLs and requests. Palamedes keeps the RSC and client translation model fixed while the matrix changes where the locale is detected and how a switch is represented.

Cookie

One URL for all locales. Best for apps behind login where SEO is irrelevant and switching should be instant.

open demosource →

Route segment

/de/checkout-style paths. The SEO-friendly default for public content with indexable localized pages.

open demosource →

Subdomain

de.example.com. Clean separation per market, works well with regional CDNs and analytics splits.

open demosource →

Top-level domain

example.de vs example.com. Maximum market trust; Palamedes maps each domain to its locale.

◌ local / CIsource →

Compare the four locale strategies →

05 — Proof and boundaries

The matrix exercises both halves of the React Server Component architecture.

Waku has its own browser-verified example family. It is not counted as proof merely because the Next.js adapter also supports Server Components.

Server tree
RSC checked

Translated output is rendered in the server-first page.

Client boundary
Island checked

Interactive translated components hydrate and switch.

Locale behavior
4 strategies

Host and path decisions are verified separately.

Evidence
Live + source

Three hosted strategies plus the checked TLD source.

06 — Questions

Waku i18n questions, answered

The short version of the decisions that usually block an implementation.

Can Palamedes translate Waku Server Components?
Yes. Activate the request's i18n instance before the Server Component tree executes translated macros. The checked Waku examples render localized server output for all four locale strategies.
Do translated Waku pages become Client Components?
No. Server Components can render translated messages on the server. Only interactive islands that react to a client-side locale change need the React client runtime.
How does the locale cross the RSC boundary?
The server resolves and activates its request-local catalog. The client boundary is initialized with the same locale and messages before interactive translated components run.
Is Waku support production-stable?
Palamedes browser-verifies its Waku integration, but the framework version in the matrix is still a Waku 1 beta. Evaluate that upstream maturity separately from the translation integration.

07 — Keep exploring

See how the same model meets a different host.

Keep Waku server-first and make every boundary speak the same locale.