import {createI18n} from 'vue-i18n'// v9.x
import en from './en.json'
import zhHans from './zh-Hans.json'
import Config from "@/config";

const localeLanguage = uni.getLocale() || Config.defaultLanguage

const i18n = createI18n({
    legacy: false,
    locale: localeLanguage,// 获取已设置的语言
    fallbackLocale: Config.defaultLanguage,
    messages:{
        en,
        'zh-Hans': zhHans,
    }
})

export {i18n}
