瀏覽代碼

fix: close browser would reset to browser default language (#19665)

tags/1.4.0
Joel 5 月之前
父節點
當前提交
85a44b7349
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      web/i18n/index.ts

+ 1
- 1
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()
}

Loading…
取消
儲存