mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-13 11:19:52 +03:00
Multi-language/I18n support #22
This commit is contained in:
16
interface/src/i18n/i18n-react.tsx
Normal file
16
interface/src/i18n/i18n-react.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten.
|
||||
/* eslint-disable */
|
||||
|
||||
import { useContext } from 'react'
|
||||
import { initI18nReact } from 'typesafe-i18n/react'
|
||||
import type { I18nContextType } from 'typesafe-i18n/react'
|
||||
import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types'
|
||||
import { loadedFormatters, loadedLocales } from './i18n-util'
|
||||
|
||||
const { component: TypesafeI18n, context: I18nContext } = initI18nReact<Locales, Translations, TranslationFunctions, Formatters>(loadedLocales, loadedFormatters)
|
||||
|
||||
const useI18nContext = (): I18nContextType<Locales, Translations, TranslationFunctions> => useContext(I18nContext)
|
||||
|
||||
export { I18nContext, useI18nContext }
|
||||
|
||||
export default TypesafeI18n
|
||||
Reference in New Issue
Block a user