uniswap-interface-uncensored/src/i18n.ts

24 lines
512 B
TypeScript
Raw 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 08:36:49 +03:00
i18next
.use(XHR)
2018-12-29 08:36:49 +03:00
.use(LanguageDetector)
.use(initReactI18next)
2018-12-29 08:36:49 +03:00
.init({
backend: {
2021-02-16 11:46:17 +03:00
loadPath: `./locales/{{lng}}.json`,
},
react: {
2021-02-16 11:46:17 +03:00
useSuspense: true,
},
fallbackLng: 'en',
preload: ['en'],
2018-12-29 08:36:49 +03:00
keySeparator: false,
2021-02-16 11:46:17 +03:00
interpolation: { escapeValue: false },
})
2018-12-29 08:36:49 +03:00
export default i18next