@verbaly/sveltekit 0.79.0 → 0.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -11,14 +11,18 @@
11
11
 
12
12
  ---
13
13
 
14
- Server-rendered pages arrive already translated in the visitor's language (cookie first, then `Accept-Language`, then your fallback) and the client hydrates with the **same locale and the same catalog**, so there's no flash of untranslated text and no hydration mismatch. Each request gets its **own instance**: no locale leaking between concurrent users.
14
+ Server-rendered pages arrive already translated in the visitor's language (the address first when your URLs carry it, then the cookie, then `Accept-Language`, then your fallback) and the client hydrates with the **same locale and the same catalog**, so there's no flash of untranslated text and no hydration mismatch. Each request gets its **own instance**: no locale leaking between concurrent users.
15
15
 
16
16
  ## 🚀 Install
17
17
 
18
18
  ```bash
19
19
  pnpm add verbaly @verbaly/sveltekit @verbaly/svelte @verbaly/vite
20
+ pnpm add -D @verbaly/compiler # the verbaly command: init, extract, check
21
+ npx verbaly init
20
22
  ```
21
23
 
24
+ `init` writes `verbaly.config.ts` and your source catalog. List your languages there (`locales: ['en', 'es']`): the build, `verbaly extract` and `verbaly check` all read them.
25
+
22
26
  ## ⚡ Wire it up
23
27
 
24
28
  **1. Vite plugin** (extraction + the `verbaly/app` module):
@@ -133,7 +137,7 @@ export const load = async ({ data }) => ({
133
137
 
134
138
  - **`routing` decides whether the URL is consulted.** With `prefix-except-source`, a prefixed URL is the answer and an unprefixed one means your source language, so a saved choice can never translate your source tree. Without `routing`, only the cookie and the header are read.
135
139
  - `cookie: false` disables cookie reading/writing (pure `Accept-Language`).
136
- - No dependency on `@sveltejs/kit`: the hook is typed structurally and stays compatible across Kit 2.x.
140
+ - No dependency on `@sveltejs/kit`: the hook is typed structurally and stays compatible with SvelteKit 2 and 3.
137
141
 
138
142
  ## 📚 Docs
139
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verbaly/sveltekit",
3
- "version": "0.79.0",
3
+ "version": "0.81.0",
4
4
  "description": "SvelteKit SSR integration for Verbaly: per-request locale negotiation and flash-free hydration.",
5
5
  "keywords": [
6
6
  "i18n",
@@ -44,12 +44,12 @@
44
44
  "access": "public"
45
45
  },
46
46
  "peerDependencies": {
47
- "verbaly": "^0.79.0"
47
+ "verbaly": "^0.81.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@sveltejs/kit": "^3.1.1",
51
51
  "svelte": "^5.57.3",
52
- "verbaly": "^0.79.0"
52
+ "verbaly": "^0.81.0"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "tsdown",