diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/+layout.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes/+layout.js b/src/routes/+layout.js new file mode 100644 index 00000000..7b5d4f44 --- /dev/null +++ b/src/routes/+layout.js @@ -0,0 +1,14 @@ +import { addTranslations, setLocale, setRoute } from "$lib/translations"; + +/** @type {import('@sveltejs/kit').Load} */ +export const load = async ({ data }) => { + const { i18n, translations } = data; + const { locale, route } = i18n; + + addTranslations(translations); + + await setRoute(route); + await setLocale(locale); + + return i18n; +}; |
