mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-06 09:24:24 +08:00
feat(i18n): add multilingual support for documentation with Chinese and English content
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
'use client';
|
||||
import SearchDialog from '@/components/search';
|
||||
import { RootProvider } from 'fumadocs-ui/provider/next';
|
||||
import { i18nProvider } from 'fumadocs-ui/i18n';
|
||||
import { type ReactNode } from 'react';
|
||||
import { translations } from '@/lib/layout.shared';
|
||||
|
||||
export function Provider({ children }: { children: ReactNode }) {
|
||||
return <RootProvider search={{ SearchDialog }}>{children}</RootProvider>;
|
||||
export function Provider({ locale, children }: { locale: string; children: ReactNode }) {
|
||||
return <RootProvider i18n={i18nProvider(translations, locale)} search={{ SearchDialog }}>{children}</RootProvider>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user