import Vue from 'vue'
import zh from './Chinese'
import en from './English'
import enLocale from 'element-ui/lib/locale/lang/en'
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import VueI18n  from 'vue-i18n'
Vue.use(VueI18n)
const messages = {
  en: {
    ...enLocale,
    ...zh
},
  zh: {
    ...zhLocale,
    ...en
}
}
const i18n = new VueI18n({locale: localStorage.getItem('language')||'zh',messages, 
})
// ElementLocale.i18n((key, value) => i18n.t(key, value))
export default i18n


 

 