How can I translate the default error message when setting the element as required in an omniscript?
1 Answer
This can definitely be achieved in a Multi-Language OmniScript. It may be possible in a single-language OmniScript as well, however from a brief test, I haven't had great results.
Multi-Language OmniScripts provide much greater flexibility regarding custom labels and translating (most) of an OmniScript.
Each standard piece of text in an OmniScript will be present in your org as a 'custom label', which you will be able to provide translations for as required.
In short:
- If you haven't already, enable translation workbench for your desired language(s)
- Find which label(s) you want to translate by referring to the OmniScript Custom Label Reference (Salesforce Documentation)
- Find the custom label to translate (i.e.
OmniRequiredWithLabel
) and provide a translation - Create a multi-language OmniScript, and test in the desired language using the 'language' option in preview
I would recommend reading up on the multi-language OmniScript documentation here: https://help.salesforce.com/s/articleView?id=sf.os_create_multi_language_omniscripts.htm&type=5
Example:
OmniRequiredWithLabel
custom label, updated with a German translation:
Multi-Language OmniScript created with a required question:
Previewing the OmniScript in German (see 'Language' option next to theme in the preview), the custom label translation now appears as expected: