simple-jscalendar
Version:
Just a simple javascript calendar
60 lines (54 loc) • 1.42 kB
JavaScript
/*
* jsCalendar language extension
* Add French Language support
* Translator: Grammatopoulos Athanasios-Vasileios (gramthanos@github)
*/
// We love anonymous functions
(function(){
// Get library
var jsCalendar = window.jsCalendar;
// If jsCalendar is not loaded
if (typeof jsCalendar === 'undefined') {
// If there is no language to load array
if (typeof window.jsCalendar_language2load === 'undefined') {
window.jsCalendar_language2load = [];
}
// Wrapper to add language to load list
jsCalendar = {
addLanguage : function (language) {
// Add language to load list
window.jsCalendar_language2load.push(language);
}
};
}
// Add a new language
jsCalendar.addLanguage({
// Language code
code : 'fr',
// Months of the year
months : [
'Janvier',
'Février',
'Mars',
'Avril',
'Mai',
'Juin',
'Juillet',
'Août',
'Septembre',
'Octobre',
'Novembre',
'Décembre'
],
// Days of the week
days : [
'Dimanche',
'Lundi',
'Mardi',
'Mercredi',
'Jeudi',
'Vendredi',
'Samedi'
]
});
})();