{"id":282,"date":"2026-10-12T11:15:58","date_gmt":"2026-10-12T03:15:58","guid":{"rendered":"https:\/\/yykcj.com\/?p=282"},"modified":"2026-10-12T11:15:58","modified_gmt":"2026-10-12T03:15:58","slug":"%e5%89%8d%e7%ab%af%e5%9b%bd%e9%99%85%e5%8c%96-i18n-%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5%ef%bc%9a%e4%bb%8e%e7%a1%ac%e7%bc%96%e7%a0%81%e5%88%b0%e8%87%aa%e5%8a%a8%e5%8c%96%e5%b7%a5%e4%bd%9c%e6%b5%81","status":"publish","type":"post","link":"https:\/\/yykcj.com\/?p=282","title":{"rendered":"\u524d\u7aef\u56fd\u9645\u5316 (i18n) \u6700\u4f73\u5b9e\u8df5\uff1a\u4ece\u786c\u7f16\u7801\u5230\u81ea\u52a8\u5316\u5de5\u4f5c\u6d41"},"content":{"rendered":"<h2>\u4e3a\u4ec0\u4e48\u4f60\u7684\u56fd\u9645\u5316\u65b9\u6848\u603b\u662f\u300c\u5dee\u70b9\u610f\u601d\u300d\uff1f<\/h2>\n<p>\u5f88\u591a\u56e2\u961f\u5728\u9879\u76ee\u521d\u671f\u4e3a\u4e86\u5feb\u901f\u4e0a\u7ebf\uff0c\u76f4\u63a5\u628a\u4e2d\u6587\u786c\u7f16\u7801\u5728\u7ec4\u4ef6\u91cc\uff0c\u7b49\u5230\u9700\u8981\u652f\u6301\u591a\u8bed\u8a00\u65f6\uff0c\u624d\u53d1\u73b0\u8981\u6539\u7684\u5730\u65b9\u904d\u5e03\u6574\u4e2a\u4ee3\u7801\u5e93\u3002\u66f4\u9ebb\u70e6\u7684\u662f\uff0c\u7ffb\u8bd1\u6587\u6848\u6563\u843d\u5728\u5404\u4e2a\u6587\u4ef6\uff0c\u4ea7\u54c1\u7ecf\u7406\u6539\u4e2a\u6587\u6848\uff0c\u5f00\u53d1\u8981\u5168\u5c40\u641c\u7d22\u66ff\u6362\uff0c\u4e00\u4e0d\u5c0f\u5fc3\u5c31\u6f0f\u6389\u6216\u6539\u9519\u3002<\/p>\n<p>\u6211\u4eec\u9700\u8981\u7684\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a <code>t('key')<\/code> \u51fd\u6570\uff0c\u800c\u662f\u4e00\u5957<strong>\u53ef\u7ef4\u62a4\u3001\u53ef\u6269\u5c55\u3001\u81ea\u52a8\u5316<\/strong>\u7684\u56fd\u9645\u5316\u5de5\u4f5c\u6d41\u3002\u672c\u6587\u5c06\u5e26\u4f60\u4ece\u96f6\u642d\u5efa\u4e00\u5957\u751f\u4ea7\u7ea7\u7684\u524d\u7aef\u56fd\u9645\u5316\u65b9\u6848\uff0c\u57fa\u4e8e React + i18next\uff0c\u4f46\u6838\u5fc3\u601d\u60f3\u9002\u7528\u4e8e\u4efb\u4f55\u6846\u67b6\u3002<\/p>\n<h2>\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u5408\u9002\u7684\u6280\u672f\u6808<\/h2>\n<p>\u524d\u7aef\u56fd\u9645\u5316\u5e93\u6709\u5f88\u591a\uff0c\u6bd4\u5982 <code>react-intl<\/code>\u3001<code>vue-i18n<\/code>\u3001<code>i18next<\/code> \u7b49\u3002\u6211\u4eec\u9009\u62e9 <strong>i18next<\/strong> \u56e0\u4e3a\u5b83\uff1a<\/p>\n<ul>\n<li>\u6846\u67b6\u65e0\u5173\uff0c\u652f\u6301 React\u3001Vue\u3001\u539f\u751f JS<\/li>\n<li>\u529f\u80fd\u5168\u9762\uff1a\u63d2\u503c\u3001\u590d\u6570\u3001\u4e0a\u4e0b\u6587\u3001\u5d4c\u5957<\/li>\n<li>\u751f\u6001\u4e30\u5bcc\uff1a\u8bed\u8a00\u68c0\u6d4b\u3001\u540e\u7aef\u52a0\u8f7d\u3001\u7f13\u5b58<\/li>\n<li>\u793e\u533a\u6d3b\u8dc3\uff0c\u6587\u6863\u8be6\u5c3d<\/li>\n<\/ul>\n<p>\u5b89\u88c5\u6838\u5fc3\u4f9d\u8d56\uff1a<\/p>\n<pre><code class=\"language-bash\">\nnpm install i18next react-i18next i18next-browser-languagedetector i18next-http-backend\n<\/code><\/pre>\n<h2>\u7b2c\u4e8c\u6b65\uff1a\u8bbe\u8ba1\u7ffb\u8bd1\u6587\u4ef6\u7684\u7ec4\u7ec7\u7ed3\u6784<\/h2>\n<p><strong>\u4e0d\u8981\u628a\u6240\u6709\u7ffb\u8bd1\u653e\u5728\u4e00\u4e2a\u5de8\u5927\u7684 JSON \u91cc<\/strong>\uff0c\u90a3\u6837\u96be\u4ee5\u7ef4\u62a4\u3002\u63a8\u8350\u6309\u300c\u547d\u540d\u7a7a\u95f4 (namespace)\u300d\u62c6\u5206\uff0c\u901a\u5e38\u6309\u9875\u9762\u6216\u529f\u80fd\u6a21\u5757\u5212\u5206\uff1a<\/p>\n<pre><code>\npublic\/locales\/\n  en\/\n    common.json\n    home.json\n    user.json\n  zh\/\n    common.json\n    home.json\n    user.json\n<\/code><\/pre>\n<p>\u6bcf\u4e2a\u6587\u4ef6\u5185\u90e8\u4f7f\u7528\u5d4c\u5957\u7ed3\u6784\uff0c\u4fbf\u4e8e\u7ba1\u7406\uff1a<\/p>\n<pre><code class=\"language-json\">\n\/\/ public\/locales\/zh\/home.json\n{\n  &quot;title&quot;: &quot;\u6b22\u8fce\u56de\u6765\uff0c{{name}}&quot;,\n  &quot;description&quot;: &quot;\u4eca\u5929\u662f\u4e2a\u597d\u65e5\u5b50&quot;,\n  &quot;actions&quot;: {\n    &quot;save&quot;: &quot;\u4fdd\u5b58&quot;,\n    &quot;cancel&quot;: &quot;\u53d6\u6d88&quot;\n  }\n}\n<\/code><\/pre>\n<p>\ud83d\udca1 <strong>\u6ce8\u610f<\/strong>\uff1akey \u7684\u547d\u540d\u8981\u6709\u610f\u4e49\uff0c\u907f\u514d <code>text1<\/code>\u3001<code>text2<\/code> \u8fd9\u79cd\u3002\u63a8\u8350\u4f7f\u7528\u8bed\u4e49\u5316\u7684\u8def\u5f84\uff0c\u5982 <code>home.actions.save<\/code>\u3002<\/p>\n<h2>\u7b2c\u4e09\u6b65\uff1a\u521d\u59cb\u5316 i18next \u5b9e\u4f8b<\/h2>\n<p>\u521b\u5efa\u4e00\u4e2a <code>i18n.js<\/code> \u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-javascript\">\nimport i18n from &#x27;i18next&#x27;;\nimport { initReactI18next } from &#x27;react-i18next&#x27;;\nimport LanguageDetector from &#x27;i18next-browser-languagedetector&#x27;;\nimport HttpBackend from &#x27;i18next-http-backend&#x27;;\n\ni18n\n  .use(HttpBackend) \/\/ \u4ece\u670d\u52a1\u5668\u52a0\u8f7d\u7ffb\u8bd1\u6587\u4ef6\n  .use(LanguageDetector) \/\/ \u68c0\u6d4b\u7528\u6237\u8bed\u8a00\n  .use(initReactI18next) \/\/ \u7ed1\u5b9a React\n  .init({\n    fallbackLng: &#x27;zh&#x27;, \/\/ \u9ed8\u8ba4\u8bed\u8a00\n    supportedLngs: [&#x27;zh&#x27;, &#x27;en&#x27;],\n    ns: [&#x27;common&#x27;, &#x27;home&#x27;, &#x27;user&#x27;], \/\/ \u547d\u540d\u7a7a\u95f4\u5217\u8868\n    defaultNS: &#x27;common&#x27;,\n    backend: {\n      loadPath: &#x27;\/locales\/{{lng}}\/{{ns}}.json&#x27;, \/\/ \u52a0\u8f7d\u8def\u5f84\n    },\n    detection: {\n      order: [&#x27;querystring&#x27;, &#x27;cookie&#x27;, &#x27;localStorage&#x27;, &#x27;navigator&#x27;],\n      caches: [&#x27;localStorage&#x27;, &#x27;cookie&#x27;], \/\/ \u7f13\u5b58\u7528\u6237\u9009\u62e9\n    },\n    interpolation: {\n      escapeValue: false, \/\/ React \u5df2\u7ecf\u5904\u7406\u4e86 XSS\n    },\n    react: {\n      useSuspense: true, \/\/ \u914d\u5408 Suspense \u4f7f\u7528\n    },\n  });\n\nexport default i18n;\n<\/code><\/pre>\n<p>\u5728\u5165\u53e3\u6587\u4ef6\u5f15\u5165\uff1a<\/p>\n<pre><code class=\"language-javascript\">\n\/\/ index.js\nimport React, { Suspense } from &#x27;react&#x27;;\nimport ReactDOM from &#x27;react-dom&#x27;;\nimport &#x27;.\/i18n&#x27;;\nimport App from &#x27;.\/App&#x27;;\n\nReactDOM.render(\n  &lt;Suspense fallback={&lt;div&gt;Loading...&lt;\/div&gt;}&gt;\n    &lt;App \/&gt;\n  &lt;\/Suspense&gt;,\n  document.getElementById(&#x27;root&#x27;)\n);\n<\/code><\/pre>\n<h2>\u7b2c\u56db\u6b65\uff1a\u5728\u7ec4\u4ef6\u4e2d\u4f7f\u7528\u7ffb\u8bd1<\/h2>\n<p>\u4f7f\u7528 <code>useTranslation<\/code> Hook\uff1a<\/p>\n<pre><code class=\"language-jsx\">\nimport React from &#x27;react&#x27;;\nimport { useTranslation } from &#x27;react-i18next&#x27;;\n\nfunction HomePage() {\n  const { t, i18n } = useTranslation(&#x27;home&#x27;); \/\/ \u6307\u5b9a\u547d\u540d\u7a7a\u95f4\n\n  const changeLanguage = (lng) =&gt; {\n    i18n.changeLanguage(lng);\n  };\n\n  return (\n    &lt;div&gt;\n      &lt;h1&gt;{t(&#x27;title&#x27;, { name: &#x27;\u5f20\u4e09&#x27; })}&lt;\/h1&gt;\n      &lt;p&gt;{t(&#x27;description&#x27;)}&lt;\/p&gt;\n      &lt;button&gt;{t(&#x27;actions.save&#x27;, { ns: &#x27;common&#x27; })}&lt;\/button&gt;\n      &lt;button onClick={() =&gt; changeLanguage(&#x27;en&#x27;)}&gt;English&lt;\/button&gt;\n      &lt;button onClick={() =&gt; changeLanguage(&#x27;zh&#x27;)}&gt;\u4e2d\u6587&lt;\/button&gt;\n    &lt;\/div&gt;\n  );\n}\n<\/code><\/pre>\n<p>\ud83d\udca1 <strong>\u6ce8\u610f<\/strong>\uff1a\u5f53\u4f7f\u7528\u591a\u4e2a\u547d\u540d\u7a7a\u95f4\u65f6\uff0c\u53ef\u4ee5\u5728 <code>useTranslation(['home', 'common'])<\/code> \u4e2d\u4f20\u5165\u6570\u7ec4\uff0c\u7136\u540e\u901a\u8fc7 <code>t('actions.save', { ns: 'common' })<\/code> \u6216 <code>t('common:actions.save')<\/code> \u6765\u6307\u5b9a\u3002<\/p>\n<h2>\u7b2c\u4e94\u6b65\uff1a\u5904\u7406\u590d\u6570\u4e0e\u52a8\u6001\u53d8\u91cf<\/h2>\n<p>i18next \u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u590d\u6570\u5904\u7406\uff0c\u53ea\u9700\u5728\u7ffb\u8bd1\u6587\u4ef6\u4e2d\u4f7f\u7528 <code><em>one<\/code>\u3001<code><\/em>other<\/code> \u7b49\u540e\u7f00\uff1a<\/p>\n<pre><code class=\"language-json\">\n\/\/ public\/locales\/en\/home.json\n{\n  &quot;itemCount&quot;: &quot;You have {{count}} item&quot;,\n  &quot;itemCount_plural&quot;: &quot;You have {{count}} items&quot;\n}\n<\/code><\/pre>\n<pre><code class=\"language-json\">\n\/\/ public\/locales\/zh\/home.json\n{\n  &quot;itemCount&quot;: &quot;\u4f60\u6709 {{count}} \u4e2a\u7269\u54c1&quot;\n}\n<\/code><\/pre>\n<p>\u4f7f\u7528\uff1a<\/p>\n<pre><code class=\"language-jsx\">\n&lt;p&gt;{t(&#x27;itemCount&#x27;, { count: 5 })}&lt;\/p&gt;\n<\/code><\/pre>\n<p>i18next \u4f1a\u6839\u636e\u8bed\u8a00\u81ea\u52a8\u9009\u62e9\u6b63\u786e\u7684\u590d\u6570\u5f62\u5f0f\uff08\u4e2d\u6587\u6ca1\u6709\u590d\u6570\u53d8\u5316\uff0c\u6240\u4ee5\u53ea\u5199\u4e00\u4e2a\u5373\u53ef\uff09\u3002<\/p>\n<h2>\u7b2c\u516d\u6b65\uff1a\u81ea\u52a8\u5316\u63d0\u53d6\u4e0e\u7ffb\u8bd1\u5de5\u4f5c\u6d41<\/h2>\n<p>\u624b\u52a8\u7ef4\u62a4\u7ffb\u8bd1\u6587\u4ef6\u5bb9\u6613\u9057\u6f0f\u3002\u63a8\u8350\u4f7f\u7528 <code>i18next-parser<\/code> \u81ea\u52a8\u626b\u63cf\u4ee3\u7801\u4e2d\u7684 <code>t()<\/code> \u8c03\u7528\uff0c\u63d0\u53d6 key \u5e76\u751f\u6210 JSON \u6587\u4ef6\u3002<\/p>\n<p>\u5b89\u88c5\uff1a<\/p>\n<pre><code class=\"language-bash\">\nnpm install i18next-parser --save-dev\n<\/code><\/pre>\n<p>\u521b\u5efa\u914d\u7f6e\u6587\u4ef6 <code>i18next-parser.config.js<\/code>\uff1a<\/p>\n<pre><code class=\"language-javascript\">\nmodule.exports = {\n  locales: [&#x27;zh&#x27;, &#x27;en&#x27;],\n  output: &#x27;public\/locales\/$LOCALE\/$NAMESPACE.json&#x27;,\n  input: [&#x27;src\/**\/*.{js,jsx,ts,tsx}&#x27;],\n  sort: true,\n  createOldCatalogs: false,\n  keepRemoved: false,\n  lexers: {\n    js: [&#x27;JavascriptLexer&#x27;],\n    jsx: [&#x27;JsxLexer&#x27;],\n    default: [&#x27;JavascriptLexer&#x27;],\n  },\n  defaultValue: (locale, namespace, key) =&gt; {\n    \/\/ \u4e2d\u6587\u73af\u5883\u4f7f\u7528 key \u4f5c\u4e3a\u9ed8\u8ba4\u503c\uff0c\u82f1\u6587\u73af\u5883\u7559\u7a7a\n    return locale === &#x27;zh&#x27; ? key : &#x27;&#x27;;\n  },\n};\n<\/code><\/pre>\n<p>\u5728 <code>package.json<\/code> \u4e2d\u6dfb\u52a0\u811a\u672c\uff1a<\/p>\n<pre><code class=\"language-json\">\n{\n  &quot;scripts&quot;: {\n    &quot;i18n:extract&quot;: &quot;i18next-parser&quot;\n  }\n}\n<\/code><\/pre>\n<p>\u8fd0\u884c <code>npm run i18n:extract<\/code>\uff0c\u5b83\u4f1a\u626b\u63cf\u4ee3\u7801\u5e76\u66f4\u65b0 JSON \u6587\u4ef6\u3002<\/p>\n<p>\ud83d\udca1 <strong>\u6ce8\u610f<\/strong>\uff1a\u63d0\u53d6\u7684 key \u9ed8\u8ba4\u4f7f\u7528 <code>t('key')<\/code> \u4e2d\u7684\u5b57\u7b26\u4e32\u3002\u5982\u679c\u4f7f\u7528\u52a8\u6001 key\uff0c\u5982 <code>t(variable)<\/code>\uff0c\u89e3\u6790\u5668\u65e0\u6cd5\u8bc6\u522b\uff0c\u9700\u8981\u624b\u52a8\u7ef4\u62a4\u6216\u4f7f\u7528 <code>t('key', { defaultValue: '...' })<\/code> \u5e76\u63d0\u4f9b\u6ce8\u91ca\u3002<\/p>\n<h2>\u7b2c\u4e03\u6b65\uff1a\u4e0e\u7ffb\u8bd1\u5e73\u53f0\u96c6\u6210<\/h2>\n<p>\u5bf9\u4e8e\u5927\u578b\u9879\u76ee\uff0c\u63a8\u8350\u5c06\u7ffb\u8bd1\u6587\u4ef6\u540c\u6b65\u5230\u4e13\u4e1a\u5e73\u53f0\uff08\u5982 Crowdin\u3001Lokalise\uff09\u3002\u4ee5 Crowdin \u4e3a\u4f8b\uff1a<\/p>\n<ol>\n<li>\u5728 Crowdin \u521b\u5efa\u9879\u76ee\uff0c\u4e0a\u4f20\u6e90\u8bed\u8a00\u6587\u4ef6\uff08\u5982 <code>zh<\/code>\uff09<\/li>\n<li>\u914d\u7f6e GitHub \u96c6\u6210\uff0c\u81ea\u52a8\u540c\u6b65<\/li>\n<li>\u7ffb\u8bd1\u5b8c\u6210\u540e\uff0cCrowdin \u4f1a\u751f\u6210 PR \u5408\u5e76\u5230\u4ed3\u5e93<\/li>\n<\/ol>\n<p>\u8fd9\u6837\uff0c\u4ea7\u54c1\u7ecf\u7406\u53ef\u4ee5\u76f4\u63a5\u5728\u5e73\u53f0\u4e0a\u4fee\u6539\u6587\u6848\uff0c\u7ffb\u8bd1\u56e2\u961f\u534f\u4f5c\u7ffb\u8bd1\uff0c\u5f00\u53d1\u53ea\u9700\u5408\u5e76 PR\u3002<\/p>\n<h2>\u7b2c\u516b\u6b65\uff1a\u4f18\u5316\u52a0\u8f7d\u6027\u80fd<\/h2>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0ci18next \u4f1a\u4e00\u6b21\u6027\u52a0\u8f7d\u6240\u6709\u547d\u540d\u7a7a\u95f4\u3002\u5bf9\u4e8e\u5927\u578b\u5e94\u7528\uff0c\u53ef\u4ee5\u6309\u9700\u52a0\u8f7d\uff1a<\/p>\n<pre><code class=\"language-jsx\">\nimport { useTranslation } from &#x27;react-i18next&#x27;;\n\nfunction UserPage() {\n  const { t } = useTranslation(&#x27;user&#x27;, { useSuspense: false });\n  \/\/ \u5f53\u7ec4\u4ef6\u6302\u8f7d\u65f6\uff0ci18next \u4f1a\u81ea\u52a8\u52a0\u8f7d user \u547d\u540d\u7a7a\u95f4\n  return &lt;div&gt;{t(&#x27;profile&#x27;)}&lt;\/div&gt;;\n}\n<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u9884\u52a0\u8f7d\u5173\u952e\u547d\u540d\u7a7a\u95f4\uff1a<\/p>\n<pre><code class=\"language-javascript\">\ni18n.loadNamespaces([&#x27;common&#x27;, &#x27;home&#x27;]);\n<\/code><\/pre>\n<h2>\u5e38\u89c1\u5751\u4e0e\u89e3\u51b3\u65b9\u6848<\/h2>\n<ol>\n<li><strong>XSS \u98ce\u9669<\/strong>\uff1ai18next \u9ed8\u8ba4\u8f6c\u4e49 HTML\uff0c\u5982\u679c\u5fc5\u987b\u6e32\u67d3 HTML\uff0c\u4f7f\u7528 <code><Trans><\/code> \u7ec4\u4ef6\uff1a<\/li>\n<\/ol>\n<p>&#8220;<code>jsx import { Trans } from 'react-i18next'; <Trans i18nKey=\"welcome\">Welcome <strong>User<\/strong><\/Trans> <\/code>&#8220;<\/p>\n<ol>\n<li><strong>\u8bed\u8a00\u5207\u6362\u540e\u7ec4\u4ef6\u4e0d\u66f4\u65b0<\/strong>\uff1a\u786e\u4fdd\u4f7f\u7528 <code>useTranslation<\/code> Hook \u6216 <code>withTranslation<\/code> HOC\uff0c\u5b83\u4eec\u4f1a\u8ba2\u9605\u8bed\u8a00\u53d8\u5316\u3002<\/li>\n<\/ol>\n<ol>\n<li><strong>\u65e5\u671f\u3001\u8d27\u5e01\u683c\u5f0f\u5316<\/strong>\uff1a\u4f7f\u7528 <code>Intl<\/code> API \u6216 i18next \u7684\u683c\u5f0f\u5316\u63d2\u4ef6\uff1a<\/li>\n<\/ol>\n<p>&#8220;<code>javascript import i18next from 'i18next'; i18next.services.formatter.add('currency', (value, lng) => { return new Intl.NumberFormat(lng, { style: 'currency', currency: 'USD' }).format(value); }); <\/code>&#8220;<\/p>\n<ol>\n<li><strong>SEO \u4e0e SSR<\/strong>\uff1a\u5982\u679c\u4f7f\u7528 Next.js\uff0c\u9700\u8981\u5728\u670d\u52a1\u7aef\u521d\u59cb\u5316 i18n \u5e76\u4f20\u9012\u8bed\u8a00\u3002\u53c2\u8003 <code>next-i18next<\/code> \u5e93\u3002<\/li>\n<\/ol>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u4e00\u5957\u597d\u7684\u56fd\u9645\u5316\u65b9\u6848\u5e94\u8be5\u5177\u5907\uff1a<\/p>\n<ul>\n<li><strong>\u6e05\u6670\u7684\u8d44\u6e90\u7ec4\u7ec7<\/strong>\uff1a\u6309\u547d\u540d\u7a7a\u95f4\u62c6\u5206\uff0c\u8bed\u4e49\u5316 key<\/li>\n<li><strong>\u81ea\u52a8\u5316\u5de5\u5177\u94fe<\/strong>\uff1a\u63d0\u53d6\u3001\u7ffb\u8bd1\u3001\u540c\u6b65\u4e00\u4f53\u5316<\/li>\n<li><strong>\u6027\u80fd\u4f18\u5316<\/strong>\uff1a\u6309\u9700\u52a0\u8f7d\uff0c\u907f\u514d\u963b\u585e\u6e32\u67d3<\/li>\n<li><strong>\u56e2\u961f\u534f\u4f5c<\/strong>\uff1a\u4ea7\u54c1\u3001\u7ffb\u8bd1\u3001\u5f00\u53d1\u5404\u53f8\u5176\u804c<\/li>\n<\/ul>\n<p>\u6309\u7167\u672c\u6587\u7684\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u642d\u5efa\u8d77\u751f\u4ea7\u7ea7\u7684\u56fd\u9645\u5316\u5de5\u4f5c\u6d41\u3002\u4e0b\u4e00\u6b65\uff0c\u53ef\u4ee5\u63a2\u7d22\u66f4\u9ad8\u7ea7\u7684\u4e3b\u9898\uff0c\u5982\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528 TypeScript \u4e3a\u7ffb\u8bd1 key \u63d0\u4f9b\u7c7b\u578b\u63d0\u793a<\/li>\n<li>\u7ed3\u5408 CI\/CD \u81ea\u52a8\u68c0\u67e5\u672a\u7ffb\u8bd1\u7684 key<\/li>\n<li>\u5b9e\u73b0\u4f2a\u7ffb\u8bd1\uff08pseudo-localization\uff09\u6d4b\u8bd5 UI \u5e03\u5c40<\/li>\n<\/ul>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u4f60\u5c11\u8d70\u5f2f\u8def\uff0c\u8ba9\u56fd\u9645\u5316\u4e0d\u518d\u662f\u96be\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u5206\u4eab\u4e00\u5957\u7ecf\u8fc7\u5927\u578b\u9879\u76ee\u9a8c\u8bc1\u7684\u524d\u7aef\u56fd\u9645\u5316\u65b9\u6848\uff0c\u6db5\u76d6\u6587\u6848\u7ba1\u7406\u3001\u52a8\u6001\u52a0\u8f7d\u3001\u590d\u6570\u5904\u7406\u3001\u81ea\u52a8\u5316\u63d0\u53d6\u4e0e\u7ffb\u8bd1\u5de5\u4f5c\u6d41\u3002\u4f60\u5c06\u5b66\u4f1a\u5982\u4f55\u4f18\u96c5\u5730\u7ec4\u7ec7\u591a\u8bed\u8a00\u8d44\u6e90\uff0c\u907f\u514d\u5e38\u89c1\u9677\u9631\uff0c\u5e76\u63d0\u5347\u56e2\u961f\u534f\u4f5c\u6548\u7387\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[77,79,11,167,78],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-3","category-4","tag-i18n","tag-i18next","tag-react","tag-167","tag-78"],"_links":{"self":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282"}],"version-history":[{"count":0,"href":"https:\/\/yykcj.com\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions"}],"wp:attachment":[{"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yykcj.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}