瀏覽代碼

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

tags/1.4.0
Joel 5 月之前
父節點
當前提交
85a44b7349
No account linked to committer's email address
共有 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…
取消
儲存