/*
 * @Descripttion:
 * @version:
 * @Author: kBank
 * @Date: 2022-07-05 17:57:49
 */
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import zhCn from 'zhCN'
// import enUS from 'enUS'
// import zhTC from 'zhTC'
// import ruRU from 'ruRU'
// import frFR from 'frFR'

import zhCnLocale from 'element-ui/lib/locale/lang/zh-CN'
import ElementLocale from 'element-ui/lib/locale'


const lang = localStorage.getItem('lang') || 'zh-CN'

Vue.use(VueI18n)

const i18n = new VueI18n({
  locale: lang,
  messages: {
    'zh-CN': { ...zhCn,...zhCnLocale },
    // 'en-US': { ...enUS },
    // 'zh-TC': { ...zhTC },
    // 'ru-RU': { ...ruRU },
    // 'fr-FR': { ...frFR },
  }

})
ElementLocale.i18n((key, value) => i18n.t(key, value))

export default i18n


