Skip to content

Release v0.16.0

Choose a tag to compare

@github-actions github-actions released this 11 Jul 17:40
b1f000f

Server-side rendering, for real. The first meta-framework integration: @verbaly/sveltekit renders every page in the visitor's language on the server — negotiated per request from their cookie or Accept-Language header — and the client hydrates with the same locale and the same catalog, so there's no flash of untranslated text and no hydration mismatch. Built on two framework-agnostic pieces (core's negotiateLocale and the new createInstance factory in virtual:verbaly) that Nuxt/Next integrations will reuse. No breaking changes, no API removals, no new dependencies.

Highlights

  • New package @verbaly/sveltekit — SvelteKit SSR in three wires: verbalyHandle() in your server hooks, one +layout load, and %verbaly.lang% in app.html. Pages arrive translated; hydration is flash-free.
  • Per-request locale negotiation — cookie → Accept-Language (with q-values and es-PEes narrowing) → fallback. Concurrent requests never leak each other's language.
  • switchLocale() — client-side language switch that loads the catalog first, then persists the choice in the cookie the server reads, so the next SSR request already matches.
  • negotiateLocale() in core — the Accept-Language matcher is a public, framework-agnostic export; use it in any Node server today.
  • createInstance() in virtual:verbaly — build a fresh, request-scoped instance sharing your compiled catalogs and loaders; the old singleton stays for SPAs. Also new: locales and sourceLocale exports.

For the full details of this release, see the repository changelog.