Override default widget text using a JSON translations file:
Available Translation Keys
The following translation keys can be overridden:
Widget Header & Messages
| Key |
Default Value |
Description |
contact-widget-title |
Contact Us |
Main title displayed at the top of the widget |
contact-widget-description |
Fill in the form below and we will get back to you as soon as possible. |
Description text below the title |
Form Labels & Placeholders
| Key |
Default Value |
Description |
contactdata-name |
Name |
Label for the first name field |
contactdata-lastname |
Last name |
Label for the last name field |
contactdata-emailaddress |
Email address |
Label for the email field |
contactdata-emailaddress-placeholder |
name@example.com |
Placeholder text for the email field |
contactdata-phonenumber |
Phone number |
Label for the phone number field |
contactdata-phonenumber-placeholder |
+32 123 456 789 |
Placeholder text for the phone number field |
contactdata-info |
Info |
Label for the message/info textarea |
contactdata-info-placeholder |
(empty) |
Placeholder text for the message textarea |
Buttons
| Key |
Default Value |
Description |
button-submit |
Send Message |
Submit button text |
button-submitting |
Submitting... |
Submit button text while form is being submitted |
button-send-another |
Send another message |
Button text on success screen to send another message |
Success Messages
| Key |
Default Value |
Description |
contact-success-title |
Thank you! |
Title shown after successful submission |
contact-success-message |
Your message has been sent successfully. We will get back to you as soon as possible. |
Message shown after successful submission |
Error Messages
| Key |
Default Value |
Description |
error-message-authentication-error |
We could not authenticate you. This is most likely due to an incorrect configuration |
Shown when API authentication fails |
error-message-not-authenticated |
The component is not configured correctly |
Shown when widget is not properly configured |
Step 1: Create a translations.json file
{
"contact-widget-title": "Get in Touch",
"contact-widget-description": "We'd love to hear from you! Fill out the form and we'll respond shortly.",
"contactdata-name": "First Name",
"contactdata-lastname": "Last Name",
"contactdata-emailaddress": "Email",
"contactdata-emailaddress-placeholder": "you@example.com",
"contactdata-phonenumber": "Phone",
"contactdata-phonenumber-placeholder": "+1 555 123 4567",
"contactdata-info": "Your Message",
"contactdata-info-placeholder": "Tell us how we can help...",
"button-submit": "Send Message",
"button-submitting": "Sending...",
"contact-success-title": "Message Sent!",
"contact-success-message": "Thank you for reaching out. We'll get back to you soon.",
"button-send-another": "Send Another Message"
}
Step 2: Reference it in the widget
<realsuite-contact-widget
apikey="your-api-key"
translationsuri="/path/to/translations.json">
</realsuite-contact-widget>
Tip: You only need to include the keys you want to override. Missing keys will fall back to the default translations.