This commit is contained in:
Vincent van der Wal
2026-08-01 15:07:28 +02:00
parent 9806396476
commit 774afa6c65
45 changed files with 1515 additions and 239 deletions
+10
View File
@@ -0,0 +1,10 @@
import { deLocalizeUrl } from '$lib/paraglide/runtime';
import type { Reroute } from '@sveltejs/kit';
/**
* The locale lives in the URL (`/de/weather/week/`), but the routes on disk are
* language-neutral. Stripping the prefix here lets one route tree serve every
* language - on the server, during prerendering and on client-side navigation.
*/
export const reroute: Reroute = (request) => deLocalizeUrl(request.url).pathname;