You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
5.4 KiB
JavaScript

"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[1231],{1481:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var s=t(5893),i=t(1151);const r={id:"localizationsettings",title:"8. \u591a\u8bed\u8a00\u914d\u7f6e",sidebar_label:"8. \u591a\u8bed\u8a00\u914d\u7f6e"},o=void 0,c={id:"settings/localizationsettings",title:"8. \u591a\u8bed\u8a00\u914d\u7f6e",description:"\u5982\u9700\u7f16\u5199\u914d\u7f6e\u7684\u65f6\u5019\u63d0\u4f9b\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c\uff0c\u53ef\u67e5\u770b \u30102.7 JSON Schema \u4f7f\u7528\u3011",source:"@site/docs/settings/localizationsettings.mdx",sourceDirName:"settings",slug:"/settings/localizationsettings",permalink:"/docs/settings/localizationsettings",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/settings/localizationsettings.mdx",tags:[],version:"current",lastUpdatedBy:"MonkSoul",lastUpdatedAt:1663034296,formattedLastUpdatedAt:"Sep 13, 2022",frontMatter:{id:"localizationsettings",title:"8. \u591a\u8bed\u8a00\u914d\u7f6e",sidebar_label:"8. \u591a\u8bed\u8a00\u914d\u7f6e"},sidebar:"settings",previous:{title:"7. \u89c4\u8303\u5316\u6587\u6863\u914d\u7f6e",permalink:"/docs/settings/specificationdocumentsettings"},next:{title:"9. JWT \u914d\u7f6e",permalink:"/docs/settings/jwtsettings"}},l={},d=[{value:"8.1 \u5173\u4e8e\u914d\u7f6e",id:"81-\u5173\u4e8e\u914d\u7f6e",level:2},{value:"8.2 \u914d\u7f6e\u4fe1\u606f",id:"82-\u914d\u7f6e\u4fe1\u606f",level:2},{value:"8.3 \u914d\u7f6e\u793a\u4f8b",id:"83-\u914d\u7f6e\u793a\u4f8b",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.admonition,{title:"\u914d\u7f6e\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c",type:"tip",children:[(0,s.jsxs)(n.p,{children:["\u5982\u9700\u7f16\u5199\u914d\u7f6e\u7684\u65f6\u5019\u63d0\u4f9b\u667a\u80fd\u63d0\u793a\u548c\u6821\u9a8c\uff0c\u53ef\u67e5\u770b \u3010",(0,s.jsx)(n.a,{href:"../jsonschema",children:"2.7 JSON Schema \u4f7f\u7528"}),"\u3011"]}),(0,s.jsxs)(n.p,{children:["\u53ea\u9700\u8981\u5728 ",(0,s.jsx)(n.code,{children:".json"})," \u6587\u4ef6\u5934\u90e8\u6dfb\u52a0\u4e0b\u5217\u914d\u7f6e\u5373\u53ef\uff1a"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2}",children:'{\r\n "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json"\r\n}\n'})})]}),"\n",(0,s.jsx)(n.h2,{id:"81-\u5173\u4e8e\u914d\u7f6e",children:"8.1 \u5173\u4e8e\u914d\u7f6e"}),"\n",(0,s.jsxs)(n.p,{children:["\u591a\u8bed\u8a00\u914d\u7f6e\u6307\u7684\u662f ",(0,s.jsx)(n.code,{children:"Furion"})," \u6846\u67b6\u5168\u7403\u5316\u548c\u672c\u5730\u5316\u9009\u9879\u3002"]}),"\n",(0,s.jsx)(n.h2,{id:"82-\u914d\u7f6e\u4fe1\u606f",children:"8.2 \u914d\u7f6e\u4fe1\u606f"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"LocalizationSettings"})," \u591a\u8bed\u8a00\u914d\u7f6e\u6839\u8282\u70b9","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ResourcesPath"}),"\uff1a\u8d44\u6e90\u76ee\u5f55\uff0c",(0,s.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(n.code,{children:"Resources"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"SupportedCultures"}),"\uff1a\u652f\u6301\u7684\u8bed\u8a00\u533a\u57df\u7801\u7c7b\u522b\uff0c",(0,s.jsx)(n.code,{children:"string[]"})," \u7c7b\u578b"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"DefaultCulture"}),"\uff1a\u9ed8\u8ba4\u8bed\u8a00\u533a\u57df\u7801\uff0c\u5982\u679c\u4e3a\u7a7a\uff0c\u5219\u53d6 ",(0,s.jsx)(n.code,{children:"SupportedCultures"})," \u7b2c\u4e00\u9879"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"LanguageFilePrefix"}),"\uff1a\u914d\u7f6e\u8d44\u6e90\u6587\u4ef6\u524d\u7f00\uff0c",(0,s.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(n.code,{children:"Lang"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"AssemblyName"}),"\uff1a\u914d\u7f6e\u8d44\u6e90\u6587\u4ef6\u5b58\u653e\u7a0b\u5e8f\u96c6\u540d\uff0c",(0,s.jsx)(n.code,{children:"string"})," \u7c7b\u578b\uff0c\u9ed8\u8ba4 ",(0,s.jsx)(n.code,{children:"\u542f\u52a8\u5c42"})," \u540d\u79f0"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"83-\u914d\u7f6e\u793a\u4f8b",children:"8.3 \u914d\u7f6e\u793a\u4f8b"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:"showLineNumbers {2,3}",children:'{\r\n "LocalizationSettings": {\r\n "SupportedCultures": ["zh-CN", "en-US"], // \u914d\u7f6e\u652f\u6301\u7684\u8bed\u8a00\u5217\u8868\r\n "DefaultCulture": "zh-CN" // \u914d\u7f6e\u9ed8\u8ba4\u8bed\u8a00\uff0c\u5982\u679c\u4e0d\u914d\u7f6e\uff0c\u53d6 SupportedCultures \u7684\u7b2c\u4e00\u9879\r\n }\r\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>c,a:()=>o});var s=t(7294);const i={},r=s.createContext(i);function o(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]);