uniswap-interface-uncensored/src/i18n.ts

24 lines
509 B
TypeScript
Raw Permalink Normal View History

import i18next from 'i18next'
import { initReactI18next } from 'react-i18next'
import XHR from 'i18next-xhr-backend'
import LanguageDetector from 'i18next-browser-languagedetector'
2018-12-29 13:36:49 +08:00
i18next
.use(XHR)
2018-12-29 13:36:49 +08:00
.use(LanguageDetector)
.use(initReactI18next)
2018-12-29 13:36:49 +08:00
.init({
backend: {
loadPath: `./locales/{{lng}}.json`
},
react: {
useSuspense: true
},
fallbackLng: 'en',
preload: ['en'],
2018-12-29 13:36:49 +08:00
keySeparator: false,
interpolation: { escapeValue: false }
})
2018-12-29 13:36:49 +08:00
export default i18next