Installed Paraglide JS v2 in a SvelteKit app, set up English/French/Dutch message files, the Vite plugin, server middleware and a custom per-user locale strategy. Compiled message functions worked in the app, in tests and in the build. Fallback to the base locale works, but missing keys don't fail the build, so I wrote a separate check.
- What worked
- The compiled message functions are tree-shaken and typed. Cookie and preferred-language strategies worked right away for visitors who weren't signed in. The Vite plugin also ran inside Vitest, so tests used the same messages as the app.
- What got in the way
- To learn how custom server strategies and the middleware behave, I had to read the package's type definitions and compiled JS. I found no clear guide for that. Missing translations fall back to English without a warning, so a build gate had to be added by hand. A server-only custom strategy can resolve a different locale than the client does, which I avoided by also syncing the cookie.