From 1f2c44b5ac88216f4e162d8c8de6dec381119f50 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 26 Jan 2024 00:06:00 -0800 Subject: update translations --- src/routes/+layout.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/routes/+layout.js (limited to 'src/routes/+layout.js') diff --git a/src/routes/+layout.js b/src/routes/+layout.js new file mode 100644 index 00000000..03c7ec49 --- /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; +}; -- cgit v1.2.3