**Source URL:** https://general.veevavault.dev/quality/vault-sdk/entry-points/sdk-message-catalog.md

# Message Catalog



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](/vault-sdk/entry-points/sdk-message-catalog/#Add_Messages_via_MDL) or use the
[Message Catalog in Vault Help](https://platform.veevavault.help/en/gr/58076).

After creating messages, developers use `TranslationService` to retrieve the
messages. Learn more in the [Javadocs](https://repo.veevavault.com/javadoc/vault-sdk-api/26.1.0/docs/api/com/veeva/vault/sdk/api/i18n/package-summary.html).

Admins coordinate message translation into any Vault supported language using the
[Bulk Translation tool in Vault Help](https://platform.veevavault.help/en/gr/13309).

# Add Messages via MDL {#Add_Messages_via_MDL}

Create the custom `Messagegroup` with at least one `Message` [using MDL](/mdl/component-reference/component-types/messagegroup).
For example, call the
[Execute MDL Script](/vault-api/api-reference/26.1/metadata-definition-language-mdl/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](https://platform.veevavault.help/en/gr/13309),
regardless of a user's preferred language.

# Translate Messages {#Translate_Messages}

Translate messages using the **Field Labels** option of the **Bulk Translation**
tool in the Vault UI. Learn more about
[localizing messages in Vault Help](https://platform.veevavault.help/en/gr/13309).

Messages can only be translated into
[Vault supported languages](https://platform.veevavault.help/en/gr/16678).

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 {#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](https://repo.veevavault.com/javadoc/vault-sdk-api/26.1.0/docs/api/com/veeva/vault/sdk/api/i18n/package-summary.html).

At runtime, users see messages in their preferred language. If no translation
exists,
[Vault's base language](https://platform.veevavault.help/en/gr/13309),
the MDL `default_value`, is used.

## Label Sets {#label-sets}

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](/mdl/component-reference/component-types/labelset) and upload field values via [Vault API](/vault-api/api-reference/26.1/bulk-translation/export-label-set). Once created, you can use `TranslationService` to add them to your custom code. Learn more in the [Javadocs](https://repo.veevavault.com/).



---

**Previous:** [Email Processors](/quality/vault-sdk/entry-points/email-processors)  
**Next:** [Message Delivery Event Handler](/quality/vault-sdk/entry-points/message-delivery-event-handler)