dify/web/app/components/provider/i18n.tsx
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

21 lines
480 B
TypeScript

'use client'
import type { Resource } from 'i18next'
import type { Locale } from '@/i18n-config'
import { I18nextProvider } from 'react-i18next'
import { createI18nextInstance } from '@/i18n-config/client'
export function I18nClientProvider({
locale,
resource,
children,
}: {
locale: Locale
resource: Resource
children: React.ReactNode
}) {
const i18n = createI18nextInstance(locale, resource)
return <I18nextProvider i18n={i18n}>{children}</I18nextProvider>
}