From 2fae4d6d040109b008b456671f41a9c3e5027328 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 14 May 2025 14:56:13 +0800 Subject: [PATCH] fix: close browser would reset language --- web/i18n/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/i18n/index.ts b/web/i18n/index.ts index 6a0d82ea36..eb49759097 100644 --- a/web/i18n/index.ts +++ b/web/i18n/index.ts @@ -12,7 +12,7 @@ export const i18n = { export type Locale = typeof i18n['locales'][number] export const setLocaleOnClient = (locale: Locale, reloadPage = true) => { - Cookies.set(LOCALE_COOKIE_NAME, locale) + Cookies.set(LOCALE_COOKIE_NAME, locale, { expires: 365 }) changeLanguage(locale) reloadPage && location.reload() }