> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-chore-myaccount-api-autoupdate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Form にカスタムメッセージや翻訳を追加して、各ステップでユーザーの言語設定に一致するロケール固有の文言を表示する方法を学びます。

# カスタムメッセージと翻訳

フォーム のメッセージはカスタマイズでき、ユーザーに独自の フォーム 体験を提供できます。さらに、フォームのコンポーネントやエラー、そのほかのカスタムメッセージを他言語に翻訳することで、ローカライズされた体験を実現できます。

<h2 id="messages">
  メッセージ
</h2>

フォームエディタでは、エラーメッセージをカスタマイズしたり、ユーザー向けのそのほかのカスタムメッセージを作成したりできます。

<h3 id="error-messages">
  エラーメッセージ
</h3>

フォームのデフォルトのエラーメッセージを置き換えるカスタムエラーメッセージを作成できます。

カスタムエラーメッセージを作成するには、以下の手順に従ってください。

1. Auth0 Dashboard で、**Actions > Forms** に移動します。
2. フォームエディターの左側のメニューから **Messages** を選択します。
3. **Errors** タブを選択します\*\*。\*\*
4. 対応するフィールドにカスタムエラーメッセージを入力して、デフォルトのメッセージを置き換えます。
5. **Publish** を選択して保存します。

<h3 id="custom-messages">
  カスタムメッセージ
</h3>

既定のメッセージに加えてカスタムメッセージを作成することで、フォーム をさらにパーソナライズできます。たとえば、フロー内で action がエラーを返したときにユーザーに表示するカスタムメッセージを追加できます。

<h4 id="create-custom-messages">
  カスタムメッセージを作成する
</h4>

カスタムメッセージを作成するには、次の手順に従います。

1. フォームエディターの左側のメニューから、**Messages** を選択します。
2. **Custom** タブを選択し、**Add New Item** を選択します。
3. 左側でメッセージの一意のキーを追加し、右側のフィールドにカスタムメッセージを入力します。
4. 保存するには、**Publish** を選択します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=86ea0b33f9922a187f26be1e324796bd" alt="Auth0 Dashboard > Forms > カスタムメッセージと翻訳 > カスタムメッセージ" data-og-width="704" width="704" data-og-height="539" height="539" data-path="docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=280&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=9130971e845a15faca06a9135f8cf768 280w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=560&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=c8b095d2088401d2aec829f7288be4f8 560w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=840&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=70554640bddaa79c58a527781bad18d1 840w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=1100&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=00b5aecd71472c812bdbdedfeff40838 1100w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=1650&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=f870ade627be5b5841a68e96eab52edb 1650w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/8QDqDsYoCi_WTBFO/docs/images/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=2500&fit=max&auto=format&n=8QDqDsYoCi_WTBFO&q=85&s=dd5cb67783918f32f4459447b6ba1ce4 2500w" />
</Frame>

<h4 id="add-custom-messages-to-your-forms">
  フォームにカスタムメッセージを追加する
</h4>

フォーム内でカスタムメッセージを参照するには、カスタムメッセージの一意のキーを指定して、関数 `{{t('custom_unique_key')}}` を使用します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=67b637194a359074d28a105d3504f1d8" alt="Auth0 Dashboard > Forms > Custom messages and translations > Translation function" data-og-width="450" width="450" data-og-height="449" height="449" data-path="docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=280&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=50df11ecc6dbbea77a8a6cc3e6d302ea 280w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=560&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=1572568975ab473f9067477b29630ad8 560w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=840&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=74f1cb962ceb91275c4e371d93a67e71 840w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=1100&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=c4c6bfce968c67a2b6346d275c8cac07 1100w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=1650&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=47a74932088e264c0581aae6fd74145f 1650w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/KVEFSMnw3xeg_LEn/docs/images/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=2500&fit=max&auto=format&n=KVEFSMnw3xeg_LEn&q=85&s=32cdbeebb8eb24524331a4f8ebe138e6 2500w" />
</Frame>

<h2 id="translations">
  翻訳
</h2>

Translations 機能を使うと、フォームを多言語対応にして、国際的なユーザー体験を提供できます。この機能では、ユーザーのブラウザー言語に基づいて、フォームに適した言語が判断されます。
デフォルトでは、一部の標準エラーメッセージについてスペイン語の翻訳が用意されています。ただし、より質の高いユーザー体験を実現するために、フォームコンポーネント、エラー、カスタムメッセージの翻訳を任意の言語で定義できます。

翻訳を有効にするには、次の手順に従ってください。

1. Auth0 Dashboard で、**Actions > Forms** に移動します。
2. フォームエディターの左側メニューから **Translations** を選択します。
3. **Enable additional languages** をオンにします。
4. **Additional languages** ドロップダウンメニューから、使用する言語を選択します。

<h3 id="translate-messages">
  メッセージを翻訳する
</h3>

言語エディターを使用すると、フォームコンポーネント、エラー、その他のカスタムメッセージの翻訳を設定できます。

翻訳を設定するには、以下の手順に従ってください。

1. 「Select language」ドロップダウンメニューから、目的の言語を選択します。
2. 次のいずれかのタブを選択して、翻訳の設定を開始します。

   1. **Components**
   2. **Errors**
   3. **Custom**
3. 各入力可能フィールドに、必要に応じて翻訳を入力します。
4. 保存するには、**Publish** を選択します。

<Frame>
  <img src="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=434a5adb7843104f77f22991ba5943ee" alt="Dashboard > Forms > Custom messages and translations > Translation message" data-og-width="701" width="701" data-og-height="885" height="885" data-path="docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=280&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=fe94259863838bba605aa231a88d15ba 280w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=560&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=431591f2fe531f0db67aba2f9f2e2cbf 560w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=840&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=e184e92bc803ba8d2122925548370915 840w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=1100&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=2ee87263f3e13821b5caef6917f8d01f 1100w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=1650&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=6843a9493b1542515fb286ab78658c6a 1650w, https://mintcdn.com/docs-dev-chore-myaccount-api-autoupdate/yeB-_kMT57yxnTpV/docs/images/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=2500&fit=max&auto=format&n=yeB-_kMT57yxnTpV&q=85&s=940787dbea98510761e1080f99963f2a 2500w" />
</Frame>
