mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
refactor(web): remove useMixedTranslation, better resource loading (#30630)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import type { Locale } from '@/i18n-config/language'
|
||||
import { atom, useAtomValue } from 'jotai'
|
||||
import { useTranslation } from '#i18n'
|
||||
import { getDocLanguage, getLanguage, getPricingPageLanguage } from '@/i18n-config/language'
|
||||
|
||||
export const localeAtom = atom<Locale>('en-US')
|
||||
export const useLocale = () => {
|
||||
return useAtomValue(localeAtom)
|
||||
const { i18n } = useTranslation()
|
||||
return i18n.language as Locale
|
||||
}
|
||||
|
||||
export const useGetLanguage = () => {
|
||||
|
||||
Reference in New Issue
Block a user