setLocale()
Description
Applies a new locale to Booking
Usage
setLocale(locale?: object | null): void;
Parameters
null- (optional) resets to the default locale (English)locale- (optional) the object of data of the new locale to be applied
Example
// create Booking
const widget = new booking.Booking("#root", {
data,
// initial configuration parameters
});
// apply the "de" locale to Booking
widget.setLocale(booking.locales.de);
// apply the default locale to Booking
widget.setLocale(); // or setLocale(null);
Related articles: