sets a new language interface for the calendar
lang | string | the name of a language |
// add once, make sure dhtmlxcalendar.js is loaded
dhtmlXCalendarObject.prototype.langData["de"] = {
// date format for inputs
dateformat: "%d.%m.%Y",
// header format
hdrformat: "%F %Y",
// full names of months
monthesFNames: [
"Januar","Februar","März","April","Mai","Juni","Juli",
"August","September","Oktober","November","Dezember"
],
// short names of months
monthesSNames: [
"Jan","Feb","Mär","Apr","Mai","Jun",
"Jul","Aug","Sep","Okt","Nov","Dez"
],
// full names of days
daysFNames: [
"Sonntag","Montag","Dienstag","Mittwoch",
"Donnerstag","Freitag","Samstag"
],
// short names of days
daysSNames: [
"So","Mo","Di","Mi",
"Do","Fr","Sa"
],
// starting day of a week. Number from 1(Monday) to 7(Sunday)
weekstart: 1,
// the title of the week number column
weekname: "w",
// name of the "Today" button
today: "Heute",
// name of the "Clear" button
clear: "Reinigen"
};
// init calendar
var myCalendar = new dhtmlXCalendarObject("input");
myCalendar.loadUserLanguage("de");
To apply language settings once for all calendar instances, use (before init):
// make sure dhtmlxcalendar.js is loaded
dhtmlXCalendarObject.prototype.lang = "de";
Back to top