diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts index 7c2f9cd..a7c7948 100644 --- a/src/lib/store/index.svelte.ts +++ b/src/lib/store/index.svelte.ts @@ -304,7 +304,6 @@ export const availableLocales = { export function updateLocale(newLocale: string) { log(["locale"], `set to ${newLocale}`); - localStorage.setItem("locale", newLocale); // @ts-expect-error shush setLocale(newLocale, { reload: false }); // @ts-expect-error shush diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 4c69cb6..42fdba4 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -71,8 +71,6 @@ theme.set( (localStorage.getItem("theme") as "light" | "dark") || "light", ); - updateLocale(localStorage.getItem("locale") || "en"); - Settings.instance.load(); fetch(`${Settings.instance.settings.vertdURL}/api/version`).then( diff --git a/vite.config.ts b/vite.config.ts index 3e2c9e6..c08fc5e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,7 +10,7 @@ export default defineConfig(({ command }) => { paraglideVitePlugin({ project: "./project.inlang", outdir: "./src/lib/paraglide", - strategy: ["globalVariable", "preferredLanguage", "baseLocale"], + strategy: ["localStorage", "preferredLanguage", "baseLocale"], }), svg({ includePaths: ["./src/lib/assets"],