62aba86d5d
This allows for translating the interface using Weblate at translate.codeberg.org! Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
12 lines
309 B
TypeScript
12 lines
309 B
TypeScript
import { browser } from '$app/environment';
|
|
import '$lib/i18n'; // Initialize i18n
|
|
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();
|
|
};
|