blob: cf08d6661cd8900cfdf2bca8419a0f08a22ba03b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
import type { LayoutLoad } from './$types'
import type { Locales } from '$lib/i18n/i18n-types'
import { loadLocaleAsync } from '$lib/i18n/i18n-util.async'
import { setLocale } from '$lib/i18n/i18n-svelte'
export const load: LayoutLoad<{ locale: Locales }> = async ({ data: { locale } }) => {
await loadLocaleAsync(locale)
setLocale(locale)
return { locale }
}
|