diff options
| author | Adam Soltys <[email protected]> | 2024-08-30 20:04:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-30 20:04:29 -0700 |
| commit | c9acca0218d47226c567da62c4a8bf97691c9b0d (patch) | |
| tree | 3986d1c5aac77f256ed1091290bc067c899e2196 /src/routes/+layout.ts | |
| parent | 9a7bb1df8ce1cff544982520add7ca8fdee799f6 (diff) | |
| download | coinos-ui-c9acca0218d47226c567da62c4a8bf97691c9b0d.tar.gz coinos-ui-c9acca0218d47226c567da62c4a8bf97691c9b0d.zip | |
typescript
Diffstat (limited to 'src/routes/+layout.ts')
| -rw-r--r-- | src/routes/+layout.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts new file mode 100644 index 00000000..7b5d4f44 --- /dev/null +++ b/src/routes/+layout.ts @@ -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; +}; |
