Release v0.19.0
Next.js joins the family — the cycle is complete. The third and last big meta-framework integration: @verbaly/next brings the write→ship cycle to the Next.js App Router — Server Components translate with await getT(), Client Components use the familiar React hooks, and every request negotiates its own locale (cookie → Accept-Language → fallback) with flash-free hydration. Works on Turbopack (the Next 16 default) and webpack. Also fixes a long-standing rich-text limitation: messages can now display literal markup like <html lang> (HTML entities decode in text runs). No breaking changes.
Highlights
- New package
@verbaly/next— Next.js App Router in two steps: wrap your config withwithVerbaly()innext.config.tsand drop<VerbalyProvider>into the root layout. Server Components translate withawait getT(); Client Components keep usinguseT/<Trans>(re-exported from@verbaly/react). - Turbopack and webpack, both first-class — the
t`…`compiler runs as a loader underturbopack.rulesand under webpack; catalogs stay code-split per locale.next devextracts your messages live;next buildblocks on missing translations. - Per-request negotiation, zero locale leaks — cookie →
Accept-Language→ fallback resolved once per request via Reactcache(); concurrent visitors never see each other's language, and hydration renders exactly what the server sent (no flash of untranslated text). useSwitchLocale()— switches the client instantly, persists the cookie the server reads, and re-renders Server Components throughrouter.refresh().- Rich messages can show literal markup —
parseTagsnow decodes<,>and&in text runs, so a message can display "<html lang>" as visible text instead of a broken escape.
For the full details of this release, see the repository changelog.