Localization
Customize BookingJs texts and languages: override default texts, insert variables, and add your own languages to the booking widget.
PRO feature:
Customize all BookingJs texts and add your own languages beyond the five default languages. Available in the Professional plans – View plans.
Overview
BookingJs supports five languages by default: German, English, French, Spanish, and Italian. You can customize all texts and add your own languages.
Setting the language
Set language
timum.init({
ref: 'ihre-ressourcen-referenz',
culture: 'de' // de, en, fr, es, it
});
// Or as a URL parameter
// ?culture=de
Automatic detection:
If not explicitly specified, the browser language is used.
Customizing texts
You don't need to redefine the entire localization object. Only specify the texts you want to change:
Override texts
timum.init({
ref: 'ihre-ressourcen-referenz',
localization: {
de: {
booked_successfully_header: 'Vielen Dank für Ihre Buchung!',
booked_successfully_message: 'Wir haben Ihnen eine Bestätigung an {{mail}} gesendet.',
book_button: 'Jetzt Termin buchen',
product_selection_headline: 'Wählen Sie Ihre Terminart'
},
en: {
booked_successfully_header: 'Thank you for your booking!',
book_button: 'Book now'
}
}
});
Available localization keys
Resource selection
| Key | Default (DE) |
|---|---|
resource_selection_headline | Ressource wählen |
product_selection_headline | Terminart wählen |
Booking successful
| Key | Default (DE) |
|---|---|
booked_successfully_header | Termin gebucht |
booked_successfully_message | Sie erhalten eine E-Mail mit den Termindetails an {{mail}} |
requested_successfully_header | Termin angefragt |
requested_successfully_message | Sie erhalten eine E-Mail sobald der Termin bestätigt wurde. |
Cancellation
| Key | Default (DE) |
|---|---|
canceled_successfully_header | Termin storniert |
cancel_button | Termin stornieren |
cancel_confirmation_question | Möchten Sie diesen Termin wirklich stornieren? |
Form
| Key | Default (DE) |
|---|---|
book_button | Termin buchen |
first_name_label | Vorname |
last_name_label | Nachname |
email_label | |
phone_label | Telefon |
message_label | Nachricht |
Variables in texts
You can use variables with {{variableName}}:
Variables
localization: {
de: {
booked_successfully_message: 'Bestätigung an {{mail}} gesendet',
appointment_for: 'Termin für {{productName}} am {{date}}',
greeting: 'Hallo {{firstName}}'
}
}
Adding a custom language
New language
timum.init({
ref: 'ihre-ressourcen-referenz',
culture: 'nl', // Dutch
localization: {
nl: {
resource_selection_headline: 'Kies een resource',
product_selection_headline: 'Kies een afspraaktype',
booked_successfully_header: 'Afspraak geboekt',
booked_successfully_message: 'U ontvangt een e-mail op {{mail}}',
book_button: 'Boek nu',
cancel_button: 'Annuleren',
first_name_label: 'Voornaam',
last_name_label: 'Achternaam',
email_label: 'E-mail',
phone_label: 'Telefoon',
message_label: 'Bericht'
// ... more keys
}
}
});
Custom Field Labels
Labels for custom form fields are also defined via localization:
Custom Field Labels
{
fields: {
companyName: {
type: 'text',
required: true
}
},
localization: {
de: {
field_companyName_label: 'Firmenname',
field_companyName_placeholder: 'Ihre Firma GmbH',
field_companyName_error: 'Bitte geben Sie einen Firmennamen an'
},
en: {
field_companyName_label: 'Company Name',
field_companyName_placeholder: 'Your Company Inc.',
field_companyName_error: 'Please enter a company name'
}
}
}
