Skip to content

Release v0.19.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 20:42
10b6a2b

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 with withVerbaly() in next.config.ts and drop <VerbalyProvider> into the root layout. Server Components translate with await getT(); Client Components keep using useT/<Trans> (re-exported from @verbaly/react).
  • Turbopack and webpack, both first-class — the t`…` compiler runs as a loader under turbopack.rules and under webpack; catalogs stay code-split per locale. next dev extracts your messages live; next build blocks on missing translations.
  • Per-request negotiation, zero locale leaks — cookie → Accept-Language → fallback resolved once per request via React cache(); 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 through router.refresh().
  • Rich messages can show literal markupparseTags now decodes &lt;, &gt; and &amp; 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.