Skip to content


The Message object is used to replace a conventional message with a configured translatable message.

The name property must contain the name of your message key configured in the translation file. Optionally, you can pass variables to your message, which will be replaced and converted to a string.

<Message name={""} variables={{name: "Jack"}} />


This example shows how you can replace your current messages with translatable messages.

    <p>Hello {name}, how are you?</p>
     <p> <Message name={"question"} variables={{name: "Jack"}} /> </p>

The configured translation file will look similar to this:

  "name": "English",
  "localName": "English",
  "code": "en",
  "messages": {
    "question": "Hello {name}, how are you?"


Property Description
name The name is the key of the message
variables Variables to be replaced in the message
default A default message if the message could not be found

Last update: 2020-12-12