2021-01-27 00:35:34 +01:00
|
|
|
import i18n from 'i18next'
|
2020-11-29 13:11:23 +01:00
|
|
|
import { initReactI18next } from 'react-i18next'
|
|
|
|
|
2022-05-13 10:53:04 +02:00
|
|
|
import de from '@root/i18n/de/_all'
|
2020-12-13 14:04:25 +01:00
|
|
|
import en from '@root/i18n/en/_all'
|
2022-05-13 19:13:29 +02:00
|
|
|
import it from '@root/i18n/it/_all'
|
2022-02-06 23:25:16 +01:00
|
|
|
import ko from '@root/i18n/ko/_all'
|
|
|
|
import vi from '@root/i18n/vi/_all'
|
2021-01-17 22:37:05 +01:00
|
|
|
import zh_Hans from '@root/i18n/zh-Hans/_all'
|
2020-11-29 18:08:31 +01:00
|
|
|
|
2021-01-27 00:35:34 +01:00
|
|
|
i18n.use(initReactI18next).init({
|
|
|
|
lng: 'en',
|
2021-01-17 22:37:05 +01:00
|
|
|
fallbackLng: 'en',
|
2020-11-29 13:11:23 +01:00
|
|
|
|
|
|
|
ns: ['common'],
|
|
|
|
defaultNS: 'common',
|
|
|
|
|
2022-05-13 16:45:23 +02:00
|
|
|
resources: { 'zh-Hans': zh_Hans, vi, ko, it, en, de },
|
2022-05-13 10:53:04 +02:00
|
|
|
returnEmptyString: false,
|
2020-11-29 13:11:23 +01:00
|
|
|
|
|
|
|
saveMissing: true,
|
2021-01-20 00:39:39 +01:00
|
|
|
missingKeyHandler: (ns, key) => {
|
|
|
|
console.log('i18n missing: ' + ns + ' : ' + key)
|
2020-11-29 13:11:23 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
interpolation: {
|
|
|
|
escapeValue: false
|
2021-01-27 00:35:34 +01:00
|
|
|
},
|
|
|
|
react: {
|
|
|
|
useSuspense: false
|
2021-02-20 19:12:44 +01:00
|
|
|
}
|
2020-11-29 13:11:23 +01:00
|
|
|
})
|
|
|
|
|
2021-01-27 00:35:34 +01:00
|
|
|
export default i18n
|