mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-29 17:45:12 +08:00
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…
x
Reference in New Issue
Block a user