> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging-update-explain-log-stream-pause.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

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

> Formsを使ってカスタムメッセージと翻訳の作成方法を説明します。

フォームメッセージをカスタマイズし、ユーザーに独自のフォームエクスペリエンスを提供できます。さらに、ローカライズエクスペリエンスのために、フォームコンポーネント、エラー、その他カスタムメッセージをその他言語に翻訳できます。

## メッセージ

フォームエディターにより、ユーザーに対してエラーメッセージをカスタマイズし、その他カスタムメッセージを作成できます。

### エラーメッセージ

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

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

1. Auth0 Dashboardで、 **［Actions（アクション）］>［Forms（フォーム）］** に移動します。
2. フォームエディターの左メニューにある **［Messages（メッセージ）］** を選択します。
3. **［Error（エラー）］** タブを選択します **。**
4. 該当するフィールドにカスタムエラーメッセージを入力し、デフォルトメッセージと置き換えます。
5. **［Publish（公開）］** を選択し、保存します。

### カスタムメッセージ

デフォルトのメッセージにカスタムメッセージを追加して、フォームのエクスペリエンスをさらにパーソナライズすることができます。たとえば、フロー内でアクションがエラーを返したときにユーザーに表示されるカスタムメッセージを追加できます。

#### カスタムメッセージを作成する

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

1. フォームエディターの左側のメニューから **［Messages（メッセージ）］** を選択します。
2. **［Custom（カスタム）］** タブを選択し、 **［Add New Item（新しい項目を追加）］** を選択します。
3. 左側に、メッセージの一意のキーを追加します **。** さらに、次に、右側のフィールドにカスタムメッセージを **入力** します。
4. **［Publish（公開）］** を選択し、保存します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=f141c9b232766f27dfdb742740756fa1" alt="Dashboard > Forms > Custom messages and translations > Custom message" data-og-width="704" width="704" data-og-height="539" height="539" data-path="docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=280&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=592cb608fb7443c57169986dd4b7b882 280w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=560&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=6bf782c0086d441333137993634c5ec3 560w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=840&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=44274df419a2a788e33d4efbd21451d7 840w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=1100&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=a153724daf2d434ec1d8556a38493e9d 1100w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=1650&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=46ca41e8f9c3b6bf009ff04d8d01f0af 1650w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/yonQHu0CmheOawQ3/docs/images/ja-jp/cdy7uua7fh8z/1upBOwWqntPPQF8fqGeN6T/a65674d05c823c5fbe703265558693e4/custom-message.png?w=2500&fit=max&auto=format&n=yonQHu0CmheOawQ3&q=85&s=f223569476df29020fb67dc6f7aeddaf 2500w" />
</Frame>

#### カスタムメッセージをフォームに追加する

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

<Frame>
  <img src="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=78baf6828bbc1049f991dacefba4345f" alt="Dashboard > Forms > Custom messages and translations > Translation function" data-og-width="450" width="450" data-og-height="449" height="449" data-path="docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=280&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=110052980ed5a2f6eb780fccb15bd294 280w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=560&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=a6139ed6d2a5fd5c18b6b54abae835ed 560w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=840&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=d282921836ae5eb1bd767273bd9e88a6 840w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=1100&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=4db2c0b9c8326f6303019200b45c1878 1100w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=1650&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=bc59b5347937304cdcc1e12b11aceb90 1650w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/_7U4_ZnEkI1VcO-C/docs/images/ja-jp/cdy7uua7fh8z/45p4V7w5gw7DQZyJ08ECSH/d040720d9aa19f6e97e21defcd428e55/translation-function.png?w=2500&fit=max&auto=format&n=_7U4_ZnEkI1VcO-C&q=85&s=e41cbecb8f893d79b4377733bc11a304 2500w" />
</Frame>

## 翻訳

翻訳機能を使用すると、フォームの国際的なユーザーエクスペリエンスを実現できます。この機能は、ユーザーのブラウザ言語を利用して、フォームに適切な言語を決定します。デフォルトでは、一部の標準エラーメッセージの翻訳はスペイン語で提供されます。ただし、質の高いユーザーエクスペリエンスを促進するために、フォームコンポーネント、エラー、カスタムメッセージの翻訳を任意の言語で定義できます。

翻訳を有効にするには、次の手順に従います。

1. Auth0 Dashboardで、 **［Actions（アクション）］>［Forms（フォーム）］** に移動します。
2. フォームエディターの左メニューにある **［Translations（翻訳）］** を選択します。
3. **［Enable additional languages（追加言語を有効にする）］** にチェックを入れます。
4. **［Additional languages（追加言語）］** ドロップダウンメニューから希望する言語を選択します。

### メッセージの翻訳

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

翻訳を定義するには、次の手順に従います。

1. ［Select language（言語選択）］ドロップダウンメニューから希望する言語を選択します。
2. 次のタブの1つを選択し、翻訳の定義を開始します。

   1. **コンポーネント**
   2. **エラー**
   3. **カスタム**
3. 利用可能なフィールドごとに、必要に応じて翻訳を提供します。
4. **［Publish（公開）］** を選択し、保存します。

<Frame>
  <img src="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=a0817122883d499586aed800ec5ef4e8" 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/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=280&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=465633e36db40df199ae9a4096c0d2c1 280w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=560&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=b1883db43522ddf4d6653b48f78e26b4 560w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=840&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=4529b4a1ee6f9e97b89cf4b3116e9122 840w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=1100&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=99d562947aacdb41c057ef58120876cc 1100w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=1650&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=035eb657d1428c4809f6ea8a147abc91 1650w, https://mintcdn.com/docs-staging-update-explain-log-stream-pause/iIZufRJ4QQy88T2f/docs/images/ja-jp/cdy7uua7fh8z/5HY9FA6HZct2XNv5K4pCHY/c5977a7825e15285c3d77c2ca1e299a8/translation-message.png?w=2500&fit=max&auto=format&n=iIZufRJ4QQy88T2f&q=85&s=17a26c6e710d01c705499b24db259e0d 2500w" />
</Frame>
