simple-jscalendar
Version:
Just a simple javascript calendar
60 lines (54 loc) • 1.4 kB
JavaScript
/*
* jsCalendar language extension
* Add Turkish Language support
* Translator: Adem Yıldız (mgvjet@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 : 'tr',
// Months of the year
months : [
'Ocak',
'Şubat',
'Mart',
'Nisan',
'Mayıs',
'Haziran',
'Temmuz',
'Ağustos',
'Eylül',
'Ekim',
'Kasım',
'Aralık'
],
// Days of the week
days : [
'Pazar',
'Pazartesi',
'Salı',
'Çarşamba',
'Perşembe',
'Cuma',
'Cumartesi'
]
});
})();