Skip to content

To provide a localized experience, Admins and Vault Java SDK developers can create translations for messages displayed to Vault end users. To do this, they either add messages with MDL or use the Message Catalog in Vault Help.

After creating messages, developers use TranslationService to retrieve the messages. Learn more in the Javadocs.

Admins coordinate message translation into any Vault supported language using the Bulk Translation tool in Vault Help.

Create the custom Messagegroup with at least one Message using MDL. For example, call the Execute MDL Script endpoint to add the message group and associated messages to Vault:

RECREATE Messagegroup person_validation__c ( label('Person Validation Messages'), Message email_format__c( default_value('${email_input} is not a valid email address.') ), Message mobile_format__c( default_value('${mobile_input} is not a valid mobile number.') ) );

In addition to conforming to the standard MDL rules, message groups and messages have additional restrictions:

  • A Messagegroup contains a maximum of 500 messages.
  • All tokens used in a Message must follow the format ${token_name}, where "token_name" is a string starting with a letter and followed by zero or more letters and underscores.

Once the messages are added to Vault, they can be called by code. However, for multiple languages to be supported, an Admin must translate the messages. For untranslated messages, Vault displays the default_value from the MDL, in Vault's base language, regardless of a user's preferred language.

Translate messages using the Field Labels option of the Bulk Translation tool in the Vault UI. Learn more about localizing messages in Vault Help.

Messages can only be translated into Vault supported languages.

In the export CSV, messages have the message__sys Type. Their Key follows the pattern Messagegroup#Message. For example: person_validation__c#email_format__c.

Use Translated Messages in Java SDK Code

Section link for Use Translated Messages in Java SDK Code

After the translated messages are imported into Vault, use TranslationService to add them to your custom code. Learn more in the Javadocs.

At runtime, users see messages in their preferred language. If no translation exists, Vault's base language, the MDL default_value, is used.

In addition to translating field labels, Vault allows Admins to create Label Sets to specify alternative Vault UI labels within a single language. This supports use cases where different groups of users within the same country or region may use different terminology to describe the same thing.

You can create Label Sets via MDL and upload field values via Vault API. Once created, you can use TranslationService to add them to your custom code. Learn more in the Javadocs.