]> git.r.bdr.sh - rbdr/prompt/blame - src/routes/[locale]/__layout.svelte
Pass public path variable
[rbdr/prompt] / src / routes / [locale] / __layout.svelte
CommitLineData
38431710
RBR
1<script context="module">
2 export async function load({ page }) {
3 return {
4 props: {
5 localeFromPath: page.params.locale
6 }
7 }
8 }
9</script>
10
11<script>
12 import '../../config/i18n';
13 export let localeFromPath;
14
15 import { locale } from 'svelte-i18n';
16 import LanguageSelector from '$lib/components/language_selector.svelte';
17
18 locale.set(localeFromPath);
19</script>
20
21<slot />
22<LanguageSelector/>