/*
 * @Descripttion: 
 * @version: 
 * @Author: kBank
 * @Date: 2022-10-24 15:33:48
 */
import Vue from 'vue'
import VueI18n from 'vue-i18n'

import ElementLocale from 'element-ui/lib/locale'
import zhCnLocale from 'element-ui/lib/locale/lang/zh-CN'
import enLocale from 'element-ui/lib/locale/lang/en'
import idLocale from 'element-ui/lib/locale/lang/id'
import ruLocale from 'element-ui/lib/locale/lang/ru-RU'
import kzLocale from 'element-ui/lib/locale/lang/kz'

import zhCn from "@/assets/languages/zhCn.js"
import enUs from "@/assets/languages/enUs.js"
import idId from "@/assets/languages/idId.js"
import ruRu from "@/assets/languages/ruRu.js"
import kzKz from "@/assets/languages/kzKz.js"

Vue.use(VueI18n)

const i18n = new VueI18n({
  locale: 'zh-CN',
  messages: {
    'zh-CN': {...zhCn, ...zhCnLocale},
    'en-US': {...enUs, ...enLocale},
    'id-ID': {...idId, ...idLocale},
    'ru-RU': {...ruRu, ...ruLocale},
    'kz-KZ': {...kzKz, ...kzLocale},
  },
})
ElementLocale.i18n((key, value) => i18n.t(key, value))

export default i18n
