i18n.ts 440 B

123456789101112131415161718
  1. import { createContext } from 'use-context-selector'
  2. import type { Locale } from '@/i18n'
  3. type II18NContext = {
  4. locale: Locale
  5. i18n: Record<string, any>,
  6. setLocaleOnClient: (locale: Locale) => void
  7. // setI8N: (i18n: Record<string, string>) => void,
  8. }
  9. const I18NContext = createContext<II18NContext>({
  10. locale: 'en',
  11. i18n: {},
  12. setLocaleOnClient: (lang: Locale) => { }
  13. // setI8N: () => {},
  14. })
  15. export default I18NContext