diff options
| author | Adam Soltys <[email protected]> | 2024-04-25 15:00:03 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-04-25 15:00:03 -0700 |
| commit | 5fcc189410a22e83bfaacbeb5fdc34e5c1910473 (patch) | |
| tree | a6991f8a79da2dc7dbd1c9b62869f109e892e0bf /src | |
| parent | d3d9a28ccbf4eb943f26da2db3bfbf4af21cc0d2 (diff) | |
| download | coinos-ui-5fcc189410a22e83bfaacbeb5fdc34e5c1910473.tar.gz coinos-ui-5fcc189410a22e83bfaacbeb5fdc34e5c1910473.zip | |
layout file
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; +}; |
