Custom messages for Constraint Rules can be translated in multiple languages based on the User's org language.

These messages can be translated from the Custom Messages tab. To set up, you require the Message, Message Tag, and the Source Object ID. The Source Object ID is the Constraint Rule Action ID.

You can add as many language as you want that are supported by Salesforce.

To translate custom messages

You must have an existing constraint rule with message.

  1. Click and click Custom Messages.
  2. To create a new custom message, click New.
  3. Type a mandatory Custom Message Name.
  4. In Message, type the same message you defined in the constraint rule action. For example: If the Constraint Rule Action Message is {1} should be suggested when customers select {0}, the Custom Message must also be {1} should be suggested when customers select {0}.
  5. Based on the language of the User's profile, type the translated message in the relevant message box. For example: For German, type the message in German language in Message_de box.
  6. In Message Tag, type the same message as in the Message box.
  7. Type or copy and paste the Source Object Id.
  8. Click Save.

If the language of the user's profile is German, on the Catalog page, when the Constraint Rule is triggered, the message is displayed in German language.