mirror of
https://github.com/tooot-app/app
synced 2025-02-09 16:38:41 +01:00
35 lines
726 B
TypeScript
35 lines
726 B
TypeScript
import i18n from 'i18next'
|
|
import { initReactI18next } from 'react-i18next'
|
|
|
|
import de from '@root/i18n/de/_all'
|
|
import en from '@root/i18n/en/_all'
|
|
import en from '@root/i18n/it/_all'
|
|
import ko from '@root/i18n/ko/_all'
|
|
import vi from '@root/i18n/vi/_all'
|
|
import zh_Hans from '@root/i18n/zh-Hans/_all'
|
|
|
|
i18n.use(initReactI18next).init({
|
|
lng: 'en',
|
|
fallbackLng: 'en',
|
|
|
|
ns: ['common'],
|
|
defaultNS: 'common',
|
|
|
|
resources: { 'zh-Hans': zh_Hans, vi, ko, it, en, de },
|
|
returnEmptyString: false,
|
|
|
|
saveMissing: true,
|
|
missingKeyHandler: (ns, key) => {
|
|
console.log('i18n missing: ' + ns + ' : ' + key)
|
|
},
|
|
|
|
interpolation: {
|
|
escapeValue: false
|
|
},
|
|
react: {
|
|
useSuspense: false
|
|
}
|
|
})
|
|
|
|
export default i18n
|