DHTMLX Docs & Samples Explorer

### Multilingual Calendar

You can define any other language for calendar and apply it any time. Languages/regional settings can be switched on the fly

Choose language:
Source

    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcalendar.css">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <script>window.dhx_globalImgPath = "../../codebase/imgs/";</script>
    <script  src="../../codebase/dhtmlxcommon.js"></script>
    <script  src="../../codebase/dhtmlxcalendar.js"></script>

    <script>var mCal;
    dhtmlxCalendarLangModules = new Array();
    dhtmlxCalendarLangModules['ru'] = {
        langname: 'ru',
        dateformat: '%d.%m.%Y',
        monthesFNames: ["Январь", "Февраль", "Март", "Апрель", "Май", "Июнь", "Июль", "Август", "Сентябрь", "Октябрь", "Ноябрь", "Декабрь"],
        monthesSNames: ["Янв", "Фев", "Мар", "Апр", "Май", "Июн", "Июл", "Авг", "Сен", "Окт", "Ноя", "Дек"],
        daysFNames: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"],
        daysSNames: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"],
        weekend: [0, 6],
        weekstart: 1,
        msgClose: "Закрыть",
        msgMinimize: "Свернуть",
        msgToday: "Сегодня";
    }
    dhtmlxCalendarLangModules['de'] = {
        langname: 'de',
        dateformat: '%d.%m.%Y',
        monthesFNames: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"],
        monthesSNames: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"],
        daysFNames: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
        daysSNames: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
        weekend: [0, 6],
        weekstart: 1,
        msgClose: "Schließen",
        msgMinimize: "Minimieren",
        msgToday: "Heute";
    }
    window.onload = function() {

        mCal = new dhtmlxCalendarObject('dhtmlxCalendar', false, {
            isYearEditable: true
        });
        mCal.loadUserLanguage('en-us');
        mCal.setYearsRange(2000, 2500);
        mCal.draw();

    }
    function chLang(lang) {
        mCal.loadUserLanguage(lang);
    }</script>

    <table border="0" cellpadding="5" >
      <tr>
    <td ><div id="dhtmlxCalendar"></div></td>
       </tr>
    </table>
    Choose language:
    <select onchange="chLang(this.value)" style="width:150px;">
    <option value="en-us">English (US)
    <option value="ru">Russian (Русский)
    <option value="de">German (Deutsche)
    </select>