Skip to content
Permalink
36bb82cb49
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
22 lines (15 sloc) 550 Bytes
export const prerender = true;
export const ssr = true;
import { browser } from '$app/environment';
import { get } from 'svelte/store';
import type { Load } from '@sveltejs/kit';
import { loadTranslations, defaultLocale } from '$lib/i18n/translations';
export const load: Load = async ({ url }) => {
const { pathname } = url;
let preferredLocale = defaultLocale;
if (browser) {
preferredLocale = get((await import('$lib/i18n/locale')).default);
}
await loadTranslations(preferredLocale, pathname);
return {};
}