fix: close browser would reset to browser default language (#19665)
This commit is contained in:
parent
5360180a2a
commit
85a44b7349
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ export const i18n = {
|
||||||
export type Locale = typeof i18n['locales'][number]
|
export type Locale = typeof i18n['locales'][number]
|
||||||
|
|
||||||
export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
|
export const setLocaleOnClient = (locale: Locale, reloadPage = true) => {
|
||||||
Cookies.set(LOCALE_COOKIE_NAME, locale)
|
Cookies.set(LOCALE_COOKIE_NAME, locale, { expires: 365 })
|
||||||
changeLanguage(locale)
|
changeLanguage(locale)
|
||||||
reloadPage && location.reload()
|
reloadPage && location.reload()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue