From Lingui to Palamedes without changing how authoring feels
The easiest Palamedes migration story is not "throw away how your team writes messages."
Page outline
Updated for Palamedes 2.0 (2026-10-29): In 2.0, the framework adapter initializes the runtime and delivers compiled catalogs for the active locale. Applications no longer register an i18n instance or load
.pocatalogs themselves, so the migration steps below now follow the 2.0 setup. The 2.0 release notes and the v2 migration guide cover what changed.
It is closer to this: keep the familiar macro-shaped authoring model, then move the machinery underneath to a smaller, stricter foundation.
What stays familiar
Palamedes keeps messages close to the code. You still write translated UI where the UI happens:
import { Trans } from "@palamedes/react/macro";
export function CheckoutTitle() {
return <Trans>Checkout</Trans>;
}
The important import change is explicit: Palamedes transforms Palamedes macro
packages, not Lingui macro packages. A migration must rewrite imports such as
@lingui/core/macro and @lingui/react/macro to the matching
@palamedes/*/macro entry points.
What changes underneath
The cleanup is mostly below the visible authoring layer:
- runtime access centers on
getI18n() - source strings and optional context are the public identity
pmds extractowns extractionpmds auditandpmds reportmake catalog health visible- the same runtime model works across the verified example matrix
That narrower model is the reason Palamedes can keep framework adapters thin. Next.js, TanStack Start, Solid, Waku, and React Router all exercise different rendering assumptions, but they do not get separate translation semantics.
A practical migration path
Start with one app path, not the whole codebase:
- Add
palamedes.yaml. - Install the scoped Palamedes packages and add your framework's adapter, such
as
@palamedes/vite-pluginor@palamedes/next-plugin. - Let the adapter initialize the runtime and deliver catalogs: remove app-owned
catalog imports, locale loader maps, and
load()oractivate()calls. - Rewrite one route or component to Palamedes macro imports.
- Run
pmds extract. - Translate one non-source locale in its
.pocatalog and verify the rendered result in the source locale and that locale.
The full checklist lives in
docs/migrate-from-lingui.md, and the shortest
copy-paste baseline is
docs/first-working-translation.md.
The migration pitch is intentionally modest: keep the authoring habit, remove the layers that made the system harder to explain.