This commit is contained in:
Raphaël MANSUY 2025-12-04 19:19:01 +08:00
parent df761099d5
commit aa03f42729

View file

@ -3,6 +3,7 @@ import { persist, createJSONStorage } from 'zustand/middleware'
import { createSelectors } from '@/lib/utils'
import { defaultQueryLabel } from '@/lib/constants'
import { Message, QueryRequest } from '@/api/lightrag'
import i18n from '@/i18n'
type Theme = 'dark' | 'light' | 'system'
type Language = 'en' | 'zh' | 'fr' | 'ar' | 'zh_TW'
@ -141,6 +142,10 @@ const useSettingsStoreBase = create<SettingsState>()(
setLanguage: (language: Language) => {
set({ language })
// Update i18n after state is updated
if (i18n.language !== language) {
i18n.changeLanguage(language)
}
},
setGraphLayoutMaxIterations: (iterations: number) =>