/*! 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:'
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
\nVant \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
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\u901A\u8FC7 Locale.add
\u65B9\u6CD5\u53EF\u4EE5\u5B9E\u73B0\u6587\u6848\u7684\u4FEE\u6539\u548C\u6269\u5C55\uFF0C\u793A\u4F8B\u5982\u4E0B\uFF1A
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\u76EE\u524D\u652F\u6301\u7684\u8BED\u8A00:
\n\u8BED\u8A00 | \n\u6587\u4EF6\u540D | \n\u7248\u672C | \n
---|---|---|
\u963F\u62C9\u4F2F\u8BED | \nar-SA | \nv3.5.0 | \n
\u4FDD\u52A0\u5229\u4E9A\u8BED | \nbg-BG | \nv3.5.0 | \n
\u5B5F\u52A0\u62C9\u8BED\uFF08\u5B5F\u52A0\u62C9\u56FD\uFF09 | \nbn-BD | \nv3.4.5 | \n
\u4E39\u9EA6\u8BED | \nda-DK | \nv3.4.8 | \n
\u5FB7\u8BED | \nde-DE | \n- | \n
\u5FB7\u8BED\uFF08\u6B63\u5F0F\uFF09 | \nde-DE-formal | \n- | \n
\u5E0C\u814A\u8BED | \nel-GR | \nv3.5.0 | \n
\u82F1\u8BED | \nen-US | \n- | \n
\u4E16\u754C\u8BED | \neo-EO | \nv4.0.9 | \n
\u897F\u73ED\u7259\u8BED | \nes-ES | \n- | \n
\u6CE2\u65AF\u8BED | \nfa-IR | \nv3.5.0 | \n
\u6CD5\u8BED | \nfr-FR | \n- | \n
\u5E0C\u4F2F\u6765\u8BED | \nhe-IL | \nv3.5.0 | \n
\u5370\u5730\u8BED | \nhi-IN | \nv3.4.3 | \n
\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED | \nid-ID | \nv3.4.5 | \n
\u51B0\u5C9B\u8BED | \nis-IS | \nv3.4.7 | \n
\u610F\u5927\u5229\u8BED | \nit-IT | \nv3.4.5 | \n
\u65E5\u8BED | \nja-JP | \n- | \n
\u9AD8\u68C9\u8BED | \nkm-KH | \nv4.1.2 | \n
\u97E9\u8BED/\u671D\u9C9C\u8BED | \nko-KR | \nv3.4.3 | \n
\u8001\u631D\u8BED | \nla-LA | \nv3.4.7 | \n
\u8499\u53E4\u8BED | \nmm-MN | \nv4.0.5 | \n
\u632A\u5A01\u8BED | \nnb-NO | \n- | \n
\u8377\u5170\u8BED | \nnl-NL | \nv4.0.5 | \n
\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09 | \npt-BR | \nv3.3.3 | \n
\u7F57\u9A6C\u5C3C\u4E9A\u8BED | \nro-RO | \n- | \n
\u4FC4\u7F57\u65AF\u8BED | \nru-RU | \nv3.1.5 | \n
\u585E\u5C14\u7EF4\u4E9A\u8BED | \nsr-RS | \nv4.6.4 | \n
\u745E\u5178\u8BED | \nsv-SE | \nv3.4.7 | \n
\u6CF0\u8BED | \nth-TH | \n- | \n
\u571F\u8033\u5176\u8BED | \ntr-TR | \n- | \n
\u4E4C\u514B\u5170\u8BED | \nuk-UA | \nv3.4.5 | \n
\u8D8A\u5357\u8BED | \nvi-VN | \nv3.4.5 | \n
\u7B80\u4F53\u4E2D\u6587 | \nzh-CN | \n- | \n
\u7E41\u9AD4\u4E2D\u6587\uFF08\u6E2F\uFF09 | \nzh-HK | \n- | \n
\u7E41\u9AD4\u4E2D\u6587\uFF08\u53F0\uFF09 | \nzh-TW | \n- | \n
\n\n\u5728 \u8FD9\u91CC \u67E5\u770B\u6240\u6709\u7684\u8BED\u8A00\u5305\u6E90\u6587\u4EF6\u3002
\n
\u4F60\u53EF\u4EE5\u901A\u8FC7 useCurrentLang
\u65B9\u6CD5\u6765\u83B7\u53D6\u5F53\u524D\u4F7F\u7528\u7684\u8BED\u8A00\u3002
function useCurrentLang(): Ref<string>;\n
\nimport { useCurrentLang } from 'vant';\n\nconst currentLang = useCurrentLang();\n\nconsole.log(currentLang.value); // --> 'zh-CN'\n
\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\u53EF\u4EE5\u4F7F\u7528 vue-i18n \u6765\u5B9E\u73B0\u3002
\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\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