From 85a44b734934400d3ce6df3e66f1d22d164e8255 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 14 May 2025 15:00:28 +0800 Subject: [PATCH] fix: close browser would reset to browser default language (#19665) --- 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() }