/*! For license information please see 4689.b8a23e02.js.LICENSE.txt */ (self.webpackChunk=self.webpackChunk||[]).push([["4689"],{41025:function(n,t,d){"use strict";d.r(t);var s=d("80681");let a=["innerHTML"];t.default={setup:()=>({html:""}),render:()=>((0,s.wg)(),(0,s.iD)("div",{class:"van-doc-markdown-body",innerHTML:'

\u56FD\u9645\u5316

\n

\u4ECB\u7ECD

\n

Vant \u91C7\u7528\u4E2D\u6587\u4F5C\u4E3A\u9ED8\u8BA4\u8BED\u8A00\uFF0C\u540C\u65F6\u652F\u6301\u591A\u8BED\u8A00\u5207\u6362\uFF0C\u8BF7\u6309\u7167\u4E0B\u65B9\u6559\u7A0B\u8FDB\u884C\u56FD\u9645\u5316\u8BBE\u7F6E\u3002

\n

\u4F7F\u7528\u65B9\u6CD5

\n

\u591A\u8BED\u8A00\u5207\u6362

\n

Vant \u901A\u8FC7 Locale \u7EC4\u4EF6\u5B9E\u73B0\u591A\u8BED\u8A00\u652F\u6301\uFF0C\u4F7F\u7528 Locale.use \u65B9\u6CD5\u53EF\u4EE5\u5207\u6362\u5F53\u524D\u4F7F\u7528\u7684\u8BED\u8A00\u3002

\n
import { Locale } from 'vant';\n// \u5F15\u5165\u82F1\u6587\u8BED\u8A00\u5305\nimport enUS from 'vant/es/locale/lang/en-US';\n\nLocale.use('en-US', enUS);\n
\n

\u8986\u76D6\u8BED\u8A00\u5305

\n

\u901A\u8FC7 Locale.add \u65B9\u6CD5\u53EF\u4EE5\u5B9E\u73B0\u6587\u6848\u7684\u4FEE\u6539\u548C\u6269\u5C55\uFF0C\u793A\u4F8B\u5982\u4E0B\uFF1A

\n
import { Locale } from 'vant';\n\nconst messages = {\n  'zh-CN': {\n    vanPicker: {\n      confirm: '\u5173\u95ED', // \u5C06'\u786E\u8BA4'\u4FEE\u6539\u4E3A'\u5173\u95ED'\n    },\n  },\n};\n\nLocale.add(messages);\n
\n

\u8BED\u8A00\u5305

\n

\u76EE\u524D\u652F\u6301\u7684\u8BED\u8A00:

\n\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001\u631D\u8BEDla-LAv3.4.7
\u8499\u53E4\u8BEDmm-MNv4.0.5
\u632A\u5A01\u8BEDnb-NO-
\u8377\u5170\u8BEDnl-NLv4.0.5
\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09pt-BRv3.3.3
\u7F57\u9A6C\u5C3C\u4E9A\u8BEDro-RO-
\u4FC4\u7F57\u65AF\u8BEDru-RUv3.1.5
\u585E\u5C14\u7EF4\u4E9A\u8BEDsr-RSv4.6.4
\u745E\u5178\u8BEDsv-SEv3.4.7
\u6CF0\u8BEDth-TH-
\u571F\u8033\u5176\u8BEDtr-TR-
\u4E4C\u514B\u5170\u8BEDuk-UAv3.4.5
\u8D8A\u5357\u8BEDvi-VNv3.4.5
\u7B80\u4F53\u4E2D\u6587zh-CN-
\u7E41\u9AD4\u4E2D\u6587\uFF08\u6E2F\uFF09zh-HK-
\u7E41\u9AD4\u4E2D\u6587\uFF08\u53F0\uFF09zh-TW-
\n
\n

\u5728 \u8FD9\u91CC \u67E5\u770B\u6240\u6709\u7684\u8BED\u8A00\u5305\u6E90\u6587\u4EF6\u3002

\n
\n

\u83B7\u53D6\u5F53\u524D\u8BED\u8A00

\n

\u4F60\u53EF\u4EE5\u901A\u8FC7 useCurrentLang \u65B9\u6CD5\u6765\u83B7\u53D6\u5F53\u524D\u4F7F\u7528\u7684\u8BED\u8A00\u3002

\n\n
function useCurrentLang(): Ref<string>;\n
\n\n
import { useCurrentLang } from 'vant';\n\nconst currentLang = useCurrentLang();\n\nconsole.log(currentLang.value); // --> 'zh-CN'\n
\n

\u5E38\u89C1\u95EE\u9898

\n

\u627E\u4E0D\u5230\u6240\u9700\u7684\u8BED\u8A00\u5305\uFF1F

\n

\u5982\u679C\u4E0A\u65B9\u5217\u8868\u4E2D\u6CA1\u6709\u4F60\u9700\u8981\u7684\u8BED\u8A00\uFF0C\u6B22\u8FCE\u7ED9\u6211\u4EEC\u63D0 Pull Request \u6765\u589E\u52A0\u65B0\u7684\u8BED\u8A00\u5305\uFF0C\u6539\u52A8\u5185\u5BB9\u53EF\u4EE5\u53C2\u8003\u589E\u52A0\u5FB7\u8BED\u8BED\u8A00\u5305 \u7684 PR\u3002

\n

\u4E1A\u52A1\u4EE3\u7801\u5982\u4F55\u5B9E\u73B0\u56FD\u9645\u5316\uFF1F

\n

\u53EF\u4EE5\u4F7F\u7528 vue-i18n \u6765\u5B9E\u73B0\u3002

\n

\u4EE5 CDN \u5F62\u5F0F\u5F15\u5165\u65F6\uFF0C\u5982\u4F55\u4F7F\u7528\u8BED\u8A00\u5305\uFF1F

\n

\u76EE\u524D\u6CA1\u6709\u63D0\u4F9B CDN \u5F62\u5F0F\u7684\u8BED\u8A00\u5305\uFF0C\u53EF\u4EE5\u624B\u52A8\u62F7\u8D1D\u8BED\u8A00\u5305\u7684\u5185\u5BB9\u6765\u4F7F\u7528\u3002

\n

\u8BED\u8A00\u5305\u4E2D\u4E0D\u5305\u542B Sku \u7EC4\u4EF6\uFF1F

\n

\u8BED\u8A00\u5305\u4E2D\u9ED8\u8BA4\u4E0D\u5305\u542B Sku \u4E1A\u52A1\u7EC4\u4EF6\u7684\u8BED\u8A00\u914D\u7F6E\uFF0C\u56E0\u6B64\u5982\u679C\u6709 Sku \u7EC4\u4EF6\u7684\u56FD\u9645\u5316\u9700\u6C42\uFF0C\u8BF7\u81EA\u884C\u914D\u7F6E\u56FD\u9645\u5316\u6587\u6848\u3002

\n
'},null,8,a))}}}]);