OSDN Git Service

update key alias update
[bytom/bytom-electron.git] / src / i18n.js
1 import i18n from 'i18next'
2 import LanguageDetector from 'i18next-browser-languagedetector'
3
4 import transaction_zh from './locales/zh/translation.json'
5 import transaction_en from './locales/en/translation.json'
6
7 i18n.use(LanguageDetector).init({
8   // we init with resources
9   resources:{
10     en: {
11       translations: transaction_en
12     },
13     zh: {
14       translations: transaction_zh
15     },
16   },
17   fallbackLng: 'en',
18   debug: false,
19
20   // have a common namespace used around the full app
21   ns: ['translations'],
22   defaultNS: 'translations',
23
24   interpolation: {
25     escapeValue: false, // not needed for react!!
26     prefix: '__',
27     suffix: '__'
28   },
29
30   react: {
31     wait: true,
32     bindStore: false
33   }
34 })
35
36 export default i18n