1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| import Vue from "vue";
| import VueI18n from "vue-i18n";
| import en from "./en.json";
| import india from "./hi.json";
| import zh from "./zh.json";
| import es from "./es.json";
|
| Vue.use(VueI18n);
|
| export const i18n = new VueI18n({
| locale: window.localStorage.getItem("language") || "en", // 从localStorage中获取 默认英文
| messages: {
| zh, // 中文语言包
| en, // 英文语言包
| hi: india, // 印度语言包
| es, // 西班牙语言包
| },
| });
|
|