The DayPilot.Locale.register() static method registers a locale so it can be referenced using its id.
DayPilot.Locale.register(locale)locale (DayPilot.Locale) - custom locale instance to register
Many common locales are registered by default. See the DayPilot.Locale class page for the built-in locale list.
Call this method after creating a custom DayPilot.Locale instance if you want to reference that locale using its id.
const locale = new DayPilot.Locale("en-us", {
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
dayNamesShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
timePattern: "h:mm tt",
datePattern: "M/d/yyyy",
dateTimePattern: "M/d/yyyy h:mm tt",
timeFormat: "Clock12Hours",
weekStarts: 0
});
DayPilot.Locale.register(locale);Localization [doc.daypilot.org]