datetimepicker 汉化

dep_wangsr
RuoYi 6 years ago committed by Limy
parent f9916509c8
commit 8e99823bbe

@ -82,7 +82,7 @@
// when page switch the datetimepicker div will be removed also. // when page switch the datetimepicker div will be removed also.
this.container = options.container || 'body'; this.container = options.container || 'body';
this.language = options.language || this.element.data('date-language') || 'en'; this.language = options.language || this.element.data('date-language') || 'zh-cn';
this.language = this.language in dates ? this.language : this.language.split('-')[0]; // fr-CA fallback to fr this.language = this.language in dates ? this.language : this.language.split('-')[0]; // fr-CA fallback to fr
this.language = this.language in dates ? this.language : 'en'; this.language = this.language in dates ? this.language : 'en';
this.isRTL = dates[this.language].rtl || false; this.isRTL = dates[this.language].rtl || false;
@ -1494,6 +1494,17 @@
}; };
$.fn.datetimepicker.Constructor = Datetimepicker; $.fn.datetimepicker.Constructor = Datetimepicker;
var dates = $.fn.datetimepicker.dates = { var dates = $.fn.datetimepicker.dates = {
'zh-cn': {
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"],
daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"],
daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"],
months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
meridiem: ["上午", "下午"],
suffix: ["st", "nd", "rd", "th"],
today: "今天",
clear: "清除"
},
en: { en: {
days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save