-
Notifications
You must be signed in to change notification settings - Fork 1
/
DOCS en-US28.0cb71eee40c7d7b6716e.js
212 lines (160 loc) · 15.2 KB
/
DOCS en-US28.0cb71eee40c7d7b6716e.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[22],{
/***/ 1030:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/vue/dist/vue.esm-browser.prod.js
var vue_esm_browser_prod = __webpack_require__(0);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/dist/templateLoader.js??ref--6!./node_modules/vue-loader/dist??ref--3-0!./website/md-loader!./website/docs/en-US/i18n.md?vue&type=template&id=015e953a
const _hoisted_1 = {
class: "content element-doc"
};
const _hoisted_2 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Internationalization");
const _hoisted_3 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("p", null, [/*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("ElementPlus components are using English "), /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "by default"), /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(", if you wish you use other languages, you can get you answer by keep reading.")], -1);
const _hoisted_4 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Global configuration ");
const _hoisted_5 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<p>ElementPlus provides global configurations</p><pre class=\"example-code\"><code class=\"hljs language-typescript\"><span class=\"hljs-keyword\">import</span> ElementPlus <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'element-plus'</span>\n<span class=\"hljs-keyword\">import</span> zhCn <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'element-plus/es/locale/lang/zh-cn'</span>\n\napp.use(ElementPlus, {\n <span class=\"hljs-attr\">locale</span>: zhCn,\n})\n</code><span class=\"lang-mark\">ts</span></pre>", 2);
const _hoisted_7 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("ConfigProvider ");
const _hoisted_8 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("ElementPlus also provides a Vue component ");
const _hoisted_9 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("ConfigProvider");
const _hoisted_10 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" for globally configuring locale and other settings.");
const _hoisted_11 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<pre class=\"example-code\"><code class=\"hljs language-html\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">template</span>></span>\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">el-config-provider</span> <span class=\"hljs-attr\">:locale</span>=<span class=\"hljs-string\">"locale"</span>></span>\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">app</span> /></span>\n <span class=\"hljs-tag\"></<span class=\"hljs-name\">el-config-provider</span>></span>\n<span class=\"hljs-tag\"></<span class=\"hljs-name\">template</span>></span>\n\n<span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span>></span><span class=\"javascript\">\n <span class=\"hljs-keyword\">import</span> { defineComponent } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'vue'</span>\n <span class=\"hljs-keyword\">import</span> { ElConfigProvider } <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'element-plus'</span>\n\n <span class=\"hljs-keyword\">import</span> zhCn <span class=\"hljs-keyword\">from</span> <span class=\"hljs-string\">'element-plus/lib/locale/lang/zh-cn'</span>\n\n <span class=\"hljs-keyword\">export</span> <span class=\"hljs-keyword\">default</span> defineComponent({\n <span class=\"hljs-attr\">components</span>: {\n ElConfigProvider,\n },\n <span class=\"hljs-function\"><span class=\"hljs-title\">setup</span>(<span class=\"hljs-params\"></span>)</span> {\n <span class=\"hljs-keyword\">return</span> {\n <span class=\"hljs-attr\">locale</span>: zhCn,\n }\n },\n })\n</span><span class=\"hljs-tag\"></<span class=\"hljs-name\">script</span>></span>\n</code><span class=\"lang-mark\">html</span></pre>", 1);
const _hoisted_12 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("CDN Usage ");
const _hoisted_13 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<p>If you are using ElementPlus via CDN, then you need to do this, let's again take unpkg as an example</p><pre class=\"example-code\"><code class=\"hljs language-html\"><span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span> <span class=\"hljs-attr\">src</span>=<span class=\"hljs-string\">"//unpkg.com/element-plus/dist/locale/zh-cn"</span>></span><span class=\"handlebars\"><span class=\"xml\">\n <span class=\"hljs-tag\"><<span class=\"hljs-name\">script</span>></span>\n app.use(ElementPlus, {\n locale: ElementPlus.lang.zhCn\n })\n</span></span><span class=\"hljs-tag\"></<span class=\"hljs-name\">script</span>></span>\n</code><span class=\"lang-mark\">html</span></pre>", 2);
const _hoisted_15 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Full documentation refer to: ");
const _hoisted_16 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("ConfigProvider");
const _hoisted_17 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("Supported Language List");
const _hoisted_18 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<ul class=\"language-list\"><li>Simplified Chinese (zh-cn)</li><li>English (en)</li><li>German (de)</li><li>Portuguese (pt)</li><li>Spanish (es)</li><li>Danish (da)</li><li>French (fr)</li><li>Norwegian (nb-NO)</li><li>Traditional Chinese (zh-tw)</li><li>Italian (it)</li><li>Korean (ko)</li><li>Japanese (ja)</li><li>Dutch (nl)</li><li>Vietnamese (vi)</li><li>Russian (ru)</li><li>Turkish (tr)</li><li>Brazilian Portuguese (pt-br)</li><li>Farsi (fa)</li><li>Thai (th)</li><li>Indonesian (id)</li><li>Bulgarian (bg)</li><li>Polish (pl)</li><li>Finnish (fi)</li><li>Swedish (sv)</li><li>Greek (el)</li><li>Slovak (sk)</li><li>Catalunya (ca)</li><li>Czech (cs)</li><li>Ukrainian (uk)</li><li>Turkmen (tk)</li><li>Tamil (ta)</li><li>Latvian (lv)</li><li>Afrikaans (af)</li><li>Estonian (et)</li><li>Slovenian (sl)</li><li>Arabic (ar)</li><li>Hebrew (he)</li><li>Lithuanian (lt)</li><li>Mongolian (mn)</li><li>Kazakh (kk)</li><li>Hungarian (hu)</li><li>Romanian (ro)</li><li>Kurdish (ku)</li><li>Uighur (ug-cn)</li><li>Khmer (km)</li><li>Serbian (sr)</li><li>Basque (eu)</li><li>Kyrgyz (ky)</li><li>Armenian (hy-am)</li><li>Croatian (hr)</li><li>Esperanto (eo)</li></ul>", 1);
const _hoisted_19 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("If you need any other languages, ");
const _hoisted_20 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("PR");
const _hoisted_21 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" is always welcomed, you only need to add a language file at ");
const _hoisted_22 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("here");
const _hoisted_23 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(".");
const _hoisted_24 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("FAQs ");
const _hoisted_25 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("If I want to replace the default language pack to reduce the size, how do I do? ");
const _hoisted_26 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("When the default language of your app is not ");
const _hoisted_27 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "English", -1);
const _hoisted_28 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(", you will be going to need to import another language file, which will increase the bundle size since you have both ");
const _hoisted_29 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "English", -1);
const _hoisted_30 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" and ");
const _hoisted_31 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "Your desired language", -1);
const _hoisted_32 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" bundled, you can use the plugin ");
const _hoisted_33 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("NormalModuleReplacementPlugin");
const _hoisted_34 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" provided by ");
const _hoisted_35 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])("webpack");
const _hoisted_36 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" to replace the default language file, so that you will only get ");
const _hoisted_37 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("strong", null, "1", -1);
const _hoisted_38 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" language file bundled. Add the code below into your ");
const _hoisted_39 = /*#__PURE__*/Object(vue_esm_browser_prod["createElementVNode"])("code", null, "webpack.config.js", -1);
const _hoisted_40 = /*#__PURE__*/Object(vue_esm_browser_prod["createTextVNode"])(" to get it work.");
const _hoisted_41 = /*#__PURE__*/Object(vue_esm_browser_prod["createStaticVNode"])("<blockquote><p>webpack.config.js</p></blockquote><pre class=\"example-code\"><code class=\"hljs language-typescript\">{\n <span class=\"hljs-attr\">plugins</span>: [\n <span class=\"hljs-keyword\">new</span> webpack.NormalModuleReplacementPlugin(\n <span class=\"hljs-regexp\">/element-plus[\\/\\\\]lib[\\/\\\\]locale[\\/\\\\]lang[\\/\\\\]en/</span>,\n <span class=\"hljs-string\">'element-plus/lib/locale/lang/zh-cn'</span>\n ),\n ]\n}\n</code><span class=\"lang-mark\">ts</span></pre>", 2);
function render(_ctx, _cache) {
const _component_app_heading = Object(vue_esm_browser_prod["resolveComponent"])("app-heading");
const _component_app_link = Object(vue_esm_browser_prod["resolveComponent"])("app-link");
const _component_right_nav = Object(vue_esm_browser_prod["resolveComponent"])("right-nav");
return Object(vue_esm_browser_prod["openBlock"])(), Object(vue_esm_browser_prod["createElementBlock"])("section", _hoisted_1, [Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
content: "Internationalization",
href: "",
level: "1"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_2]),
_: 1
}), _hoisted_3, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "global-configuration",
content: "Global configuration",
href: "#global-configuration",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_4, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#global-configuration"
})]),
_: 1
}), _hoisted_5, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "configprovider",
content: "ConfigProvider",
href: "#configprovider",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_7, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#configprovider"
})]),
_: 1
}), Object(vue_esm_browser_prod["createElementVNode"])("p", null, [_hoisted_8, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "/#/zh-CN/component/config-provider"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_9]),
_: 1
}), _hoisted_10]), _hoisted_11, Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "cdn-usage",
content: "CDN Usage",
href: "#cdn-usage",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_12, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#cdn-usage"
})]),
_: 1
}), _hoisted_13, Object(vue_esm_browser_prod["createElementVNode"])("p", null, [_hoisted_15, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "/#/zh-CN/component/config-provider"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_16]),
_: 1
})]), Object(vue_esm_browser_prod["createElementVNode"])("p", null, [Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://github.com/element-plus/element-plus/tree/dev/packages/locale/lang"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_17]),
_: 1
})]), _hoisted_18, Object(vue_esm_browser_prod["createElementVNode"])("p", null, [_hoisted_19, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://github.com/element-plus/element-plus/pulls"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_20]),
_: 1
}), _hoisted_21, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://github.com/element-plus/element-plus/tree/dev/packages/locale/lang"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_22]),
_: 1
}), _hoisted_23]), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "faqs",
content: "FAQs",
href: "#faqs",
level: "2"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_24, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#faqs"
})]),
_: 1
}), Object(vue_esm_browser_prod["createVNode"])(_component_app_heading, {
id: "if-i-want-to-replace-the-default-language-pack-to-reduce-the-size-how-do-i-do",
content: "If I want to replace the default language pack to reduce the size, how do I do?",
href: "#if-i-want-to-replace-the-default-language-pack-to-reduce-the-size-how-do-i-do",
level: "3"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_25, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
class: "header-anchor",
href: "#if-i-want-to-replace-the-default-language-pack-to-reduce-the-size-how-do-i-do"
})]),
_: 1
}), Object(vue_esm_browser_prod["createElementVNode"])("p", null, [_hoisted_26, _hoisted_27, _hoisted_28, _hoisted_29, _hoisted_30, _hoisted_31, _hoisted_32, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://webpack.js.org/plugins/normal-module-replacement-plugin/#root"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_33]),
_: 1
}), _hoisted_34, Object(vue_esm_browser_prod["createVNode"])(_component_app_link, {
href: "https://webpack.js.org"
}, {
default: Object(vue_esm_browser_prod["withCtx"])(() => [_hoisted_35]),
_: 1
}), _hoisted_36, _hoisted_37, _hoisted_38, _hoisted_39, _hoisted_40]), _hoisted_41, Object(vue_esm_browser_prod["createVNode"])(_component_right_nav)]);
}
// CONCATENATED MODULE: ./website/docs/en-US/i18n.md?vue&type=template&id=015e953a
// CONCATENATED MODULE: ./website/docs/en-US/i18n.md
const script = {}
script.render = render
/* harmony default export */ var i18n = __webpack_exports__["default"] = (script);
/***/ })
}]);