fix(web): language setting (#10024)

This commit is contained in:
Michel Heusschen 2024-06-07 18:35:05 +02:00 committed by GitHub
parent 9ac2ac2fcb
commit def5f59242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 20 additions and 19 deletions

View file

@ -1,5 +1,5 @@
import { browser } from '$app/environment';
import { Theme } from '$lib/constants';
import { Theme, defaultLang } from '$lib/constants';
import { persisted } from 'svelte-local-storage-store';
import { get } from 'svelte/store';
@ -42,7 +42,7 @@ export const locale = persisted<string | undefined>('locale', undefined, {
},
});
export const lang = persisted<string | undefined>('lang', undefined, {
export const lang = persisted('lang', defaultLang.code, {
serializer: {
parse: (text) => text,
stringify: (object) => object ?? '',