Browse Source

datetimepicker 汉化

RuoYi 6 years ago
parent
commit
9fc42511c6

+ 12 - 1
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.js

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

File diff suppressed because it is too large
+ 0 - 0
ruoyi-admin/src/main/resources/static/ajax/libs/datapicker/bootstrap-datetimepicker.min.js


Some files were not shown because too many files changed in this diff