mirror of https://github.com/langgenius/dify.git
fix: close browser would reset to browser default language (#19665)
This commit is contained in:
parent
5360180a2a
commit
85a44b7349
|
|
@ -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…
Reference in New Issue