This commit is contained in:
Vincent van der Wal
2026-08-01 17:58:17 +02:00
parent 01cc6225aa
commit 578ee3c8ce
8 changed files with 1692 additions and 1639 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { error, redirect } from '@sveltejs/kit';
import { deLocalizeHref, localizeHref } from '$lib/paraglide/runtime';
import { deLocalizeHref, getLocale, localizeHref } from '$lib/paraglide/runtime';
import type { GeoLocation } from '$lib/stores/settings';
@@ -115,7 +115,7 @@ export async function resolveLocationFromRoute({
location = candidate;
} else {
const res = await event.fetch(
`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(urlLocationName)}&count=1&language=en&format=json`
`https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(urlLocationName)}&count=1&language=${encodeURIComponent(getLocale())}&format=json`
);
if (!res.ok) error(404, 'Location not found');
const geocodingResponse = await res.json();