// import en_us from '../lang/en_us.json'
import zh_cn from '../lang/zh_cn.json'
// import fr_fr from '../lang/fr_fr.json'
// import th_th from '../lang/th_th.json'
// import ja_jp from '../lang/ja_jp.json'
// import it_it from '../lang/it_it.json'
// import ko_kr from '../lang/ko_kr.json'
// import mn_mn from '../lang/mn_mn.json'
// import vi_vn from '../lang/vi_vn.json'
// import zh_ft from '../lang/zh_ft.json'
import Vue from 'vue'; 
import VueI18n from 'vue-i18n'


Vue.use(VueI18n)
let langJson = {
		'zh_cn': zh_cn,
	}
let lang = '';
// #ifdef MP || APP-PLUS
lang = uni.getStorageSync('locale') != '' ? uni.getStorageSync('locale') : 'zh_cn';
// #endif
// #ifdef H5
lang = uni.getStorageSync('locale') != '' ? uni.getStorageSync('locale') : navigator.language.toLowerCase().replace('-','_');
// #endif
const i18n = new VueI18n({
	locale: lang in langJson ? lang :'zh_cn',
	messages: langJson
})

//import i18n from './lang.js';
// const i18n = {
// 		t:function(key){
// 			return key
// 		}
// 	}


export default i18n 