aboutsummaryrefslogtreecommitdiffstats
path: root/apps/kit/src/lib/components/locale-switcher.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'apps/kit/src/lib/components/locale-switcher.svelte')
-rw-r--r--apps/kit/src/lib/components/locale-switcher.svelte4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/kit/src/lib/components/locale-switcher.svelte b/apps/kit/src/lib/components/locale-switcher.svelte
index 2e2d339..f880bfb 100644
--- a/apps/kit/src/lib/components/locale-switcher.svelte
+++ b/apps/kit/src/lib/components/locale-switcher.svelte
@@ -1,4 +1,5 @@
<script lang="ts">
+ import pwKey from "$actions/pwKey";
import { browser } from "$app/environment";
import { page } from "$app/stores";
import { CookieNames } from "$lib/configuration";
@@ -8,6 +9,8 @@
import { loadLocaleAsync } from "$lib/i18n/i18n-util.async";
import Cookies from "js-cookie";
+ export let _pwKey: string | undefined = undefined;
+
async function switch_locale(newLocale: Locales) {
if (!newLocale || $locale === newLocale) return;
await loadLocaleAsync(newLocale);
@@ -42,6 +45,7 @@
</script>
<select
+ use:pwKey={_pwKey}
on:change={on_change}
class="mt-1 mr-1 block border-none py-2 pl-3 pr-10 text-base rounded-md right-0 absolute focus:outline-none focus:ring-teal-500 sm:text-sm"
>