我需要使用 React i18n 搜索并移动文件 .json 以实现国际化。硬编码文本和手动制作太长而且不确定。我想使用自动解决方案。
举例来说:在我检查之前
function NotFoundPage(props) {
const { t } = useTranslation("notFoundPage");
return (
<Result
status="404"
title="404"
subTitle="Sorry, the page you visited does not exist."
extra={
<Button
type="primary"
style={{ margin: "auto" }}
onClick={() => props.history.push("/")}
>
Back to Projects
</Button>
}
/>
);
Run Code Online (Sandbox Code Playgroud)
}
经过我的检查
function NotFoundPage(props) {
const { t } = useTranslation("notFoundPage");
return (
<Result
status="404"
title="404"
subTitle={t("Sorry, the page you visited does not exist.")}
extra={
<Button
type="primary"
style={{ margin: "auto" }}
onClick={() => …Run Code Online (Sandbox Code Playgroud) 对于我的考试,我必须解释void *C和C ++中通用指针()的区别。它们是两件事,但是我找不到它们之间的区别。