如何用I18Next返回JSX对象?

问题描述 投票:0回答:1
reactjs frontend typeerror i18next
1个回答
0
投票

我认为解决此问题的最佳方法不是翻译您拥有的整个“checkbox1”行,而是仅引用退货内部的链接,然后翻译其他单独的文本。

return (<p> {t("exchange.iAgreeWith")} {termsOfUseLink} {t("exchange.and")} {howItWorksLink} {t("exchange.and")} {privacyPolicyLink } </p>

Json 文件:

"iAgreeWith": "I agree with",
"and" : "and"
 "checkbox1-links": {
   "termsOfUse": "Terms of Use",
   "howItWorks": "How it works",
   "privacyPolicy": "Privacy Policy"
 },
© www.soinside.com 2019 - 2024. All rights reserved.