mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): language setting (#10024)
This commit is contained in:
parent
9ac2ac2fcb
commit
def5f59242
4 changed files with 20 additions and 19 deletions
|
|
@ -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 ?? '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue