i18n-ui.ts 423 B

1234567891011
  1. import { defineI18nUI } from 'fumadocs-ui/i18n';
  2. import { i18n } from './i18n';
  3. // UI-side i18n config: provides the language-switcher display names and the
  4. // `provider(locale)` props consumed by <RootProvider i18n={...}>.
  5. export const { provider } = defineI18nUI(i18n, {
  6. en: { displayName: 'English' },
  7. fa: { displayName: 'فارسی' },
  8. ru: { displayName: 'Русский' },
  9. zh: { displayName: '中文' },
  10. });