aboutsummaryrefslogtreecommitdiffstats
path: root/apps/kit/src/routes/+layout.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/kit/src/routes/+layout.ts')
-rw-r--r--apps/kit/src/routes/+layout.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/kit/src/routes/+layout.ts b/apps/kit/src/routes/+layout.ts
new file mode 100644
index 0000000..de8a5c0
--- /dev/null
+++ b/apps/kit/src/routes/+layout.ts
@@ -0,0 +1,9 @@
+import type {Locales} from "$lib/i18n/i18n-types";
+import {loadLocaleAsync} from "$lib/i18n/i18n-util.async";
+import type {LayoutLoad} from "./$types";
+
+export const load: LayoutLoad<{ locale: Locales }> = async ({url, params}) => {
+ let lang = "en" as Locales;
+ await loadLocaleAsync(lang);
+ return {locale: lang};
+}; \ No newline at end of file