如何在AWS Amplify上更改这些文本?

问题描述

enter image description here

我无法更改标签文本。有什么解决办法吗?

解决方法

自定义文本和添加语言翻译可以通过 I18n 模块完成:

import { I18n } from "aws-amplify";
import { Translations } from "@aws-amplify/ui-components";

I18n.putVocabulariesForLanguage("en-US",{
  [Translations.SIGN_IN_HEADER_TEXT]: "Custom Sign In Header Text",[Translations.SIGN_IN_ACTION]: "Custom Click Here to Sign In"
});

可以在 Translations.ts 中找到所有可翻译字符串的完整列表。

来源:https://docs.amplify.aws/ui/customization/translations/q/framework/vue