gc_i18n 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lang/index.js ADDED
@@ -0,0 +1,38 @@
1
+ import pro_zh_CN from "pro_iview_v3/lib/locales/zh-CN";
2
+ import iview_zh_CN from "view-ui-plus/dist/locale/zh-CN";
3
+ import pro_zh_TW from "pro_iview_v3/lib/locales/zh-TW";
4
+ import iview_zh_TW from "view-ui-plus/dist/locale/zh-TW";
5
+ import pro_en_US from "pro_iview_v3/lib/locales/en-US";
6
+ import iview_en_US from "view-ui-plus/dist/locale/en-US";
7
+
8
+ import gc_i18n from "../packages/index.js";
9
+ export const languages = [
10
+ {
11
+ code: "zh-CN",
12
+ name: "简体中文"
13
+ },
14
+ {
15
+ code: "zh-TW",
16
+ name: "繁体中文"
17
+ },
18
+ {
19
+ code: "en-US",
20
+ name: "英文"
21
+ }
22
+ ];
23
+ export default {
24
+ install(app, router) {
25
+ const { i18n } = new gc_i18n({
26
+ appCode: "TEST",
27
+ router,
28
+ local: localStorage.getItem("I18N_LANGUAGE"),
29
+ orgCode: "GREENCLOUD",
30
+ messages: {
31
+ "zh-CN": { ...pro_zh_CN, ...iview_zh_CN },
32
+ "zh-TW": { ...pro_zh_TW, ...iview_zh_TW },
33
+ "en-US": { ...pro_en_US, ...iview_en_US }
34
+ }
35
+ });
36
+ app.use(i18n);
37
+ }
38
+ };
@@ -0,0 +1,12 @@
1
+ {
2
+ "qylb2": {
3
+ "zh-cn": "首页",
4
+ "zh-tw": "首頁",
5
+ "en-us": "首页"
6
+ },
7
+ "jcve2": {
8
+ "zh-cn": "测试",
9
+ "zh-tw": "測試",
10
+ "en-us": "测试"
11
+ }
12
+ }