(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d2134fb"],{abae:function(s,t,a){"use strict";a.r(t);var e=function(){var s=this,t=s.$createElement;s._self._c;return s._m(0)},r=[function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("section",[a("h2",[s._v("国际化")]),a("p",[s._v("stc-ui 默认采用中文作为语言，如果需要使用其他语言，可以参考下面的方案")]),a("h3",[s._v("多语言切换")]),a("p",[s._v("stc-ui 通过 Locale 组件实现多语言支持，使用 "),a("code",{pre:!0},[s._v("Locale.use")]),s._v(" 方法可以切换当前使用的语言。")]),a("pre",{pre:!0},[a("code",{pre:!0,attrs:{"v-pre":"",class:"language-js"}},[a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" { Locale } "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'stc-ui'")]),s._v(";\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" enUS "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'stc-ui/es/locale/lang/en-US'")]),s._v(";\n\nLocale.use("),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'en-US'")]),s._v(", enUS);\n")])]),a("h3",[s._v("修改默认文案")]),a("p",[s._v("通过 "),a("code",{pre:!0},[s._v("Locale.add")]),s._v(" 方法可以实现文案的修改和扩展，示例如下：")]),a("pre",{pre:!0},[a("code",{pre:!0,attrs:{"v-pre":"",class:"language-js"}},[a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("import")]),s._v(" { Locale } "),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("from")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'stc-ui'")]),s._v(";\n\n"),a("span",{pre:!0,attrs:{class:"hljs-keyword"}},[s._v("const")]),s._v(" messages = {\n  "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'zh-CN'")]),s._v(": {\n    "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("picker")]),s._v(": {\n      "),a("span",{pre:!0,attrs:{class:"hljs-attr"}},[s._v("confirm")]),s._v(": "),a("span",{pre:!0,attrs:{class:"hljs-string"}},[s._v("'关闭'")]),s._v(" "),a("span",{pre:!0,attrs:{class:"hljs-comment"}},[s._v("// 将'确认'修改为'关闭'")]),s._v("\n    }\n  }\n};\n\nLocale.add(messages);\n")])]),a("h3",[s._v("配置文件")]),a("p",[s._v("目前支持的语言:")]),a("table",[a("thead",[a("tr",[a("th",[s._v("语言")]),a("th",[s._v("文件名")])])]),a("tbody",[a("tr",[a("td",[s._v("简体中文")]),a("td",[s._v("zh-CN")])]),a("tr",[a("td",[s._v("繁體中文（台）")]),a("td",[s._v("zh-TW")])]),a("tr",[a("td",[s._v("英语")]),a("td",[s._v("en-US")])])])])])}],n=a("6691"),l={},v=Object(n["a"])(l,e,r,!1,null,null,null);t["default"]=v.exports}}]);
//# sourceMappingURL=chunk-2d2134fb.3baa4e6d.js.map