mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 12:37:20 +08:00
parent
71976f9192
commit
a5e24ff6d3
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import React, { useEffect } from 'react'
|
import React, { useEffect } from 'react'
|
||||||
import { changeLanguage } from '@/i18n/i18next-config'
|
|
||||||
import I18NContext from '@/context/i18n'
|
import I18NContext from '@/context/i18n'
|
||||||
import type { Locale } from '@/i18n'
|
import type { Locale } from '@/i18n'
|
||||||
import { setLocaleOnClient } from '@/i18n'
|
import { setLocaleOnClient } from '@/i18n'
|
||||||
@ -16,7 +15,7 @@ const I18n: FC<II18nProps> = ({
|
|||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
changeLanguage(locale)
|
setLocaleOnClient(locale, false)
|
||||||
}, [locale])
|
}, [locale])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user