Datepicker Localization, First Day of week

Creative Contact Form is a responsive jQuery contact form with amazing visual effects. You will be surprised by count of all the possible features!

  • Ho to translate Datepicker?


    Open the following file - components/com_creativecontactform/assets/js/creativecontactform.js, and add the following code at the end of file, before closing tags:
    Code: Select all
    })
    })(creativeJ);


    Code for French:
    Code: Select all
    /*Datepicker Localization*/
    (function( factory ) {
    if ( typeof define === "function" && define.amd ) {

       // AMD. Register as an anonymous module.
       define([ "../datepicker" ], factory );
    } else {

       // Browser globals
       factory( creativeJ.datepicker );
    }
    }(function( datepicker ) {

    datepicker.regional.fr = {
       closeText: "Fermer",
       prevText: "Précédent",
       nextText: "Suivant",
       currentText: "Aujourd'hui",
       monthNames: [ "janvier", "février", "mars", "avril", "mai", "juin",
          "juillet", "août", "septembre", "octobre", "novembre", "décembre" ],
       monthNamesShort: [ "janv.", "févr.", "mars", "avr.", "mai", "juin",
          "juil.", "août", "sept.", "oct.", "nov.", "déc." ],
       dayNames: [ "dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi" ],
       dayNamesShort: [ "dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam." ],
       dayNamesMin: [ "D","L","M","M","J","V","S" ],
       weekHeader: "Sem.",
       dateFormat: "dd/mm/yy",
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: "" };
    datepicker.setDefaults( datepicker.regional.fr );

    return datepicker.regional.fr;

    }));
    /*END Datepicker Localization*/

    For English language use this code:
    Code: Select all
    datepicker.regional[ "en-GB" ] = {
       closeText: "Done",
       prevText: "Prev",
       nextText: "Next",
       currentText: "Today",
       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" ],
       dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
       dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
       dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ],
       weekHeader: "Wk",
       dateFormat: "dd/mm/yy",
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: "" };
    datepicker.setDefaults( datepicker.regional[ "en-GB" ] );

    return datepicker.regional[ "en-GB" ];


    For Russian language use this code:
    Code: Select all
    datepicker.regional.ru = {
       closeText: "Закрыть",
       prevText: "<Пред",
       nextText: "След>",
       currentText: "Сегодня",
       monthNames: [ "Январь","Февраль","Март","Апрель","Май","Июнь",
       "Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь" ],
       monthNamesShort: [ "Янв","Фев","Мар","Апр","Май","Июн",
       "Июл","Авг","Сен","Окт","Ноя","Дек" ],
       dayNames: [ "воскресенье","понедельник","вторник","среда","четверг","пятница","суббота" ],
       dayNamesShort: [ "вск","пнд","втр","срд","чтв","птн","сбт" ],
       dayNamesMin: [ "Вс","Пн","Вт","Ср","Чт","Пт","Сб" ],
       weekHeader: "Нед",
       dateFormat: "dd.mm.yy",
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: "" };
    datepicker.setDefaults( datepicker.regional.ru );

    return datepicker.regional.ru;



    For German language use this code:
    Code: Select all
    datepicker.regional.de = {
       closeText: "Schließen",
       prevText: "<Zurück",
       nextText: "Vor>",
       currentText: "Heute",
       monthNames: [ "Januar","Februar","März","April","Mai","Juni",
       "Juli","August","September","Oktober","November","Dezember" ],
       monthNamesShort: [ "Jan","Feb","Mär","Apr","Mai","Jun",
       "Jul","Aug","Sep","Okt","Nov","Dez" ],
       dayNames: [ "Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag" ],
       dayNamesShort: [ "So","Mo","Di","Mi","Do","Fr","Sa" ],
       dayNamesMin: [ "So","Mo","Di","Mi","Do","Fr","Sa" ],
       weekHeader: "KW",
       dateFormat: "dd.mm.yy",
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: "" };
    datepicker.setDefaults( datepicker.regional.de );

    return datepicker.regional.de;


    For Spanish language use this code:
    Code: Select all
    datepicker.regional.es = {
       closeText: "Cerrar",
       prevText: "<Ant",
       nextText: "Sig>",
       currentText: "Hoy",
       monthNames: [ "enero","febrero","marzo","abril","mayo","junio",
       "julio","agosto","septiembre","octubre","noviembre","diciembre" ],
       monthNamesShort: [ "ene","feb","mar","abr","may","jun",
       "jul","ago","sep","oct","nov","dic" ],
       dayNames: [ "domingo","lunes","martes","miércoles","jueves","viernes","sábado" ],
       dayNamesShort: [ "dom","lun","mar","mié","jue","vie","sáb" ],
       dayNamesMin: [ "D","L","M","X","J","V","S" ],
       weekHeader: "Sm",
       dateFormat: "dd/mm/yy",
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: "" };
    datepicker.setDefaults( datepicker.regional.es );

    return datepicker.regional.es;


    For Armenian language use this code:
    Code: Select all
    datepicker.regional['hy'] = {
       closeText: 'Փակել',
       prevText: '<Նախ.',
       nextText: 'Հաջ.>',
       currentText: 'Այսօր',
       monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
       'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
       monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
       'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
       dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
       dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
       dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
       weekHeader: 'ՇԲՏ',
       dateFormat: 'dd.mm.yy',
       firstDay: 1,
       isRTL: false,
       showMonthAfterYear: false,
       yearSuffix: ''};
    datepicker.setDefaults(datepicker.regional['hy']);
    return datepicker.regional['hy'];


    List of translations can be found here: https://github.com/jquery/jquery-ui/tree/master/ui/i18n

    To change first day of week, change firstDay property.
    Best Regards,

    Simon
    User avatar
    Simon
    Site Admin
     
    Posts: 1498
    Joined: Wed Mar 05, 2014 1:04 am


Return to Creative Contact Form




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest
cron