Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

Joel85a44b734934
diff --git a/web/i18n/index.ts b/web/i18n/index.ts
index 6a0d82ea363..eb497590974 100644
--- a/web/i18n/index.ts
+++ b/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()
}