This repository has been archived on 2026-08-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
drizzli/src/hooks.ts
T
2026-08-01 15:07:28 +02:00

11 lines
434 B
TypeScript

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;