Skip to content

Commit 4e6bc61

Browse files
committed
Make timezoneList translatable.
* Added english default translation * Added german translation * Usage: $('input.datetimepicker').datetimepicker({ showTimezone: true, timezoneList: [ {"value": "-1100", "label": "minusEleven"}, {"value": "-1000", "label": "minusTen"}, {"value": "-0900", "label": "minusNine"}, {"value": "-0800", "label": "minusEight"}, {"value": "-0700", "label": "minusSeven"}, {"value": "-0600", "label": "minusSix"}, {"value": "-0500", "label": "minusFive"}, {"value": "-0400", "label": "minusFour"}, {"value": "-0300", "label": "minusThree"}, {"value": "-0200", "label": "minusTwo"}, {"value": "-0100", "label": "minusOne"}, {"value": "+0000", "label": "plusMinusZero"}, {"value": "+0100", "label": "plusOne"}, {"value": "+0200", "label": "plusTwo"}, {"value": "+0300", "label": "plusThree"}, {"value": "+0400", "label": "plusFour"}, {"value": "+0500", "label": "plusFive"}, {"value": "+0600", "label": "plusSix"}, {"value": "+0700", "label": "plusSeven"}, {"value": "+0800", "label": "plusEight"}, {"value": "+0900", "label": "plusNine"}, {"value": "+1000", "label": "plusTen"}, {"value": "+1100", "label": "plusEleven"}, {"value": "+1200", "label": "plusTwelve"}, {"value": "+1300", "label": "plusThirteen"} ]
1 parent 704c0b9 commit 4e6bc61

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,32 @@ function Timepicker() {
4949
minuteText: 'Minute',
5050
secondText: 'Second',
5151
millisecText: 'Millisecond',
52-
timezoneText: 'Time Zone'
52+
timezoneText: 'Time Zone',
53+
minusEleven: '-11h NUT: Niue Time',
54+
minusTen: '-10h HST: Hawaii Standard Time',
55+
minusNine: '-09h HDT: Hawaii Summer Time',
56+
minusEight: '-08h PST: Pacific Standard Time',
57+
minusSeven: '-07h PDT: Pacific Summer Time',
58+
minusSix: '-06h CST: Central Standard Time (America)',
59+
minusFive: '-05h EST: Eastern Standard Time (America)',
60+
minusFour: '-04h EDT: Eastern Summer Time (America)',
61+
minusThree: '-03h BRT: Brasilia Standard Time',
62+
minusTwo: '-02h BRST: Brasilia Summer Time',
63+
minusOne: '-01h CVT: Cape Verde Time',
64+
plusMinusZero: '±00h UTC: Universal Coordinated Time (Greenwich)',
65+
plusOne: '+01h CET: Central European Standard Time',
66+
plusTwo: '+02h CEST: Central European Summer Time',
67+
plusThree: '+03h AST: Arabia Time',
68+
plusFour: '+04h MSK: Moscow Time',
69+
plusFive: '+05h PKT: Pakistan Time',
70+
plusSix: '+06h BST: Bangladesh Time',
71+
plusSeven: '+07h ICT: Indochina Time',
72+
plusEight: '+08h CST: China Standard Time',
73+
plusNine: '+09h JST: Japan Time',
74+
plusTen: '+10h AEST: Australian Eastern Standard Time',
75+
plusEleven: '+11h AEDT: Australian Eastern Summer Time',
76+
plusTwelve: '+12h NZST: New Zealand Standard Time',
77+
plusThirteen: '+13h NZDT: New Zealand Summer Time'
5378
};
5479
this._defaults = { // Global defaults for all the datetime picker instances
5580
showButtonPanel: true,
@@ -441,7 +466,7 @@ $.extend(Timepicker.prototype, {
441466
$.map(o.timezoneList, function(val, idx) {
442467
return $("<option />")
443468
.val(typeof val == "object" ? val.value : val)
444-
.text(typeof val == "object" ? val.label : val);
469+
.text(typeof val == "object" ? o[val.label] : val);
445470
})
446471
);
447472
this.timezone_select.val((typeof this.timezone != "undefined" && this.timezone != null && this.timezone != "") ? this.timezone : o.timezone);

localization/jquery-ui-timepicker-de.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,32 @@
1414
timeFormat: 'hh:mm tt',
1515
amNames: ['vorm.', 'AM', 'A'],
1616
pmNames: ['nachm.', 'PM', 'P'],
17-
ampm: false
17+
ampm: false,
18+
minusEleven: '-11h NUT: Niue Zeit',
19+
minusTen: '-10h HST: Hawaiianische Standardzeit',
20+
minusNine: '-09h HDT: Hawaiianische Sommerzeit',
21+
minusEight: '-08h PST: Pazifische Standardzeit',
22+
minusSeven: '-07h PDT: Pazifische Sommerzeit',
23+
minusSix: '-06h CST: Zentrale Standardzeit (Amerika)',
24+
minusFive: '-05h EST: Östliche Standardzeit (Amerika)',
25+
minusFour: '-04h EDT: Östliche Sommerzeit (Amerika)',
26+
minusThree: '-03h BRT: Brasilianische Standardzeit',
27+
minusTwo: '-02h BRST: Brasilianische Sommerzeit',
28+
minusOne: '-01h CVT: Kap Verde Zeit',
29+
plusMinusZero: '±00h UTC: Koordinierte Weltzeit (Greenwich)',
30+
plusOne: '+01h CET: Mitteleuropäische Standardzeit (MEZ)',
31+
plusTwo: '+02h CEST: Mitteleuropäische Sommerzeit (MESZ)',
32+
plusThree: '+03h AST: Arabische Zeit',
33+
plusFour: '+04h MSK: Moskauer Zeit',
34+
plusFive: '+05h PKT: Pakistanische Zeit',
35+
plusSix: '+06h BST: Bangladesch Zeit',
36+
plusSeven: '+07h ICT: Indochinesische Zeit',
37+
plusEight: '+08h CST: Chinesische Standardzeit',
38+
plusNine: '+09h JST: Japanische Zeit',
39+
plusTen: '+10h AEST: Ost-Australische Standardzeit',
40+
plusEleven: '+11h AEDT: Ost-Australische Sommerzeit',
41+
plusTwelve: '+12h NZST: Neuseeländische Standardzeit',
42+
plusThirteen: '+13h NZDT: Neuseeländische Sommerzeit'};
1843
};
1944
$.timepicker.setDefaults($.timepicker.regional['de']);
2045
})(jQuery);

0 commit comments

Comments
 (0)