Any script variable, page part, and calendar can be translated during culture change event using the OnJSLocalization custom function.
OnJSLocalization function will only be called if it is created inside the hosting page.
The calendar can be designed using calendar.css. If the reference for these styles is not present inside the head tags of the hosting page, it will then be referenced during the run time (for this purpose the file will be located in the e-Form scripts as it is inside the NuGet repository).
The culture codes are created inside the Designer with localization creation.
Example:
const OnJSLocalization = function (e) {
//TODO: do some stuff here (change web labels/design etc.)
//localization logic
switch (e) {
case 'en-US':
//calendar localization for US english
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
shortDays = ["Mon“, "Tue", "Wed“, "Thu", "Fri", "Sat", "Sun"];
longDays = ['Monday', 'Tuestaday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
someVariableFromPage = 'translation';
break;
case 'cs-CZ':
//calendar localization for Czech
months = ['Leden', 'Únor', 'Brezen', 'Duben', 'Kveten', 'Cerven', 'Cervenec', 'Srpen', 'Zárí', 'Ríjen', 'Listopad', 'Prosinec'];
shortDays = ["Po", "Ut", "St", "Ct", "Pá", "So", "Ne"];
longDays = ['Pondelí', 'Úterý', 'Streda', 'Ctvrtek', 'Pátek', 'Sobota', 'Nedele'];
someVariableFromPage = 'preklad';
break;
}
}