Browse Source

更改默认语言为英文

吴洪双 5 năm trước cách đây
mục cha
commit
044be3f1aa
2 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 1 1
      App.vue
  2. 2 2
      main.js

+ 1 - 1
App.vue

@@ -2,7 +2,7 @@
 	export default {
 		onLaunch: function() {
 			console.log('App Launch');
-			var lan = 'zh'
+			var lan = 'en'
 			 try {
 				const res = uni.getSystemInfoSync();
 				lan = res.language

+ 2 - 2
main.js

@@ -12,7 +12,7 @@ import mainStatistics from '@/pages/Charts/mainStatistics';
 Vue.use(VueI18n)
 Vue.config.productionTip = !!env.isProduction;
 const i18n = new VueI18n({  
-  locale: 'zh-CN',  // 默认选择的语言
+  locale: 'en-US',  // 默认选择的语言
    messages: {
          'zh-CN': zh,   // 中文语言包
          'en-US': en    // 英文语言包
@@ -36,4 +36,4 @@ Object.keys(apis).forEach(key => {
 	Vue.prototype[`$${key}`] = apis[key];
 });
 
-Vue.component('mainStatistics', mainStatistics);
+Vue.component('mainStatistics', mainStatistics);