This commit is contained in:
unurled 2025-07-06 14:56:36 +02:00
parent 764d0c0526
commit ac111154fe
7 changed files with 183 additions and 0 deletions

11
src/routes/+layout.ts Normal file
View file

@ -0,0 +1,11 @@
import { browser } from '$app/environment';
import '$lib/i18n'; // Import to initialize. Important :)
import { locale, waitLocale } from 'svelte-i18n';
import type { LayoutLoad } from './$types';
export const load: LayoutLoad = async () => {
if (browser) {
locale.set(window.navigator.language);
}
await waitLocale();
};