by Firecheckout Support

How to localize the delivery date calendar?

The default calendar language in the Delivery Date module is English. If you want to change language, then you have to do a little bit of coding.

The example below will work perfectly with the FireCheckout module. In this example, let's change the calendar language to Dutch.

  • Go to FireCheckout config Custom CSS and JS section.
  • Insert code below into the “Custom JS” field:
require([
    'jquery',
    'jquery/ui',
], function ($) {
var datepicker = $.datepicker;

datepicker.regional.myLang = {
    closeText: "Sluiten",
    prevText: "←",
    nextText: "→",
    currentText: "Vandaag",
    monthNames: [ "januari", "februari", "maart", "april", "mei", "juni",
    "juli", "augustus", "september", "oktober", "november", "december" ],
    monthNamesShort: [ "jan", "feb", "mrt", "apr", "mei", "jun",
    "jul", "aug", "sep", "okt", "nov", "dec" ],
    dayNames: [ "zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag" ],
    dayNamesShort: [ "zon", "maa", "din", "woe", "don", "vri", "zat" ],
    dayNamesMin: [ "zo", "ma", "di", "wo", "do", "vr", "za" ],
    weekHeader: "Wk",
    dateFormat: "dd-mm-yy",
    firstDay: 1,
    isRTL: false,
    showMonthAfterYear: false,
    yearSuffix: "" };
datepicker.setDefaults( datepicker.regional.myLang );
});

Save config. Clear Magento cache. Check FireCheckout at the frontend.

Note: you can find Languages localization at https://github.com/jquery/jquery-ui/tree/master/ui/i18n.

If you want to apply other localization, you have to get datepicker.regional.myLang initialization. Feel free to change some translations according to your requirements. In case you don't see your language, you can make localization by yourself.

Recent articles

up