24 lines
459 B
JavaScript
24 lines
459 B
JavaScript
import i18n from 'i18next'
|
|
import i18nBackend from 'i18next-http-backend'
|
|
import { initReactI18next } from 'react-i18next'
|
|
|
|
i18n
|
|
.use(i18nBackend)
|
|
.use(initReactI18next)
|
|
.init({
|
|
lng: 'vi',
|
|
fallbackLng: 'en',
|
|
debug: false,
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
// react: {
|
|
// useSuspense: false
|
|
// },
|
|
backend: {
|
|
loadPath: `${window.location.origin}/i18n/{{lng}}.json`,
|
|
},
|
|
})
|
|
|
|
export default i18n
|