-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12-9c128e7e1f8e9241073d.js
1 lines (1 loc) · 3.8 KB
/
12-9c128e7e1f8e9241073d.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{949:function(n,a,t){"use strict";t.r(a),t.d(a,"default",(function(){return x}));var e=t(840),s=t.n(e),o=t(841),c=t.n(o),p=t(521),r=t.n(p),i=t(842),l=t.n(i),u=t(843),d=t.n(u),f=t(844),k=t.n(f),m=t(845),h=t.n(m),g=t(846),v=t.n(g),y=t(0),w=t.n(y),b=t(210);function C(n){var a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,e=k()(n);if(a){var s=k()(this).constructor;t=Reflect.construct(e,arguments,s)}else t=e.apply(this,arguments);return d()(this,t)}}function E(n){return w.a.createElement(n.tag,v()({},n.attributes,{dangerouslySetInnerHTML:{__html:n.html}}))}function S(n){return w.a.createElement(E,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function j(n){return w.a.createElement(E,{tag:"style",html:n.style})}y.Component;var x=function(n){l()(t,n);var a=C(t);function t(){return s()(this,t),a.apply(this,arguments)}return c()(t,[{key:"componentDidMount",value:function(){var n=location.hash;if(n){var a=document.querySelector('a[href="'.concat(n,'"]'));a&&Object(b.a)(document.documentElement,0,function n(a,t){for(;a;)return a.offsetTop&&"static"!==getComputedStyle(a).position&&(t+=a.offsetTop),n(a.parentNode,t);return t}(a,-9))}}},{key:"render",value:function(){return w.a.createElement("div",{className:"zandoc-react-container",key:null},w.a.createElement(j,{style:""}),w.a.createElement(S,{html:'<h2 class="anchor-heading"><a href="#i18n">¶</a><a href="javascript:void(0)" id="i18n" class="anchor-point"></a>I18n</h2>\n<p>The default language of Zent is Simplified Chinese, if you want switch to Engilish, you can follow the instruction below.</p>\n<h4 class="anchor-heading"><a href="#i18nprovider">¶</a><a href="javascript:void(0)" id="i18nprovider" class="anchor-point"></a>I18nProvider</h4>\n<p>Zent provides a React Component I18nProvider used to configure the locale text. Components using context, a feature of React, to achieve global effectiveness by wrapping your app.</p>\n<pre><code class="language-jsx"><span class="token keyword module">import</span> <span class="token punctuation">{</span> <span class="token maybe-class-name">I18nProvider</span> <span class="token keyword module">as</span> <span class="token maybe-class-name">Provider</span> <span class="token punctuation">}</span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n<span class="token keyword module">import</span> enUS <span class="token keyword module">from</span> <span class="token string">\'zent/es/i18n/en-US\'</span><span class="token punctuation">;</span>\n\n<span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Provider</span></span> <span class="token attr-name">value</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>enUS<span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">App</span></span> <span class="token punctuation">/></span></span>\n<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Provider</span></span><span class="token punctuation">></span></span></code></pre>\n<p>At present, only Chinese / English language packs are available, corresponding to two files of <code>en-US.js</code> /<code>zh-CN.js</code> in i18n folder.</p>'}))}}]),t}(y.Component)}}]);