summaryrefslogtreecommitdiffstats
path: root/src/docs/i18n.html
blob: 1d4a514952fd00e2ae5e9fcc9ca737c8f9be4ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!-- ---------------------------------------------- -->
<!-- ---------------------------------------------- -->
<div id="I18n" class="section">
	<h2>Internationalization (i18n)</h2>

	<p>Intimidate time comes with full support for i18n.  You can create your own or use the pre-built ones in the i18n directory by simply including it in your page.</p>

<pre>
$.intimidatetime.i18n['en'] = {
	format: 'yyyy-MM-dd HH:mm',      // default format 'yyyy-MM-dd hh:mm:ss:l tt z'
	units: {
		year: { 
				format: 'yyyy',      // how should hour be forrmated in drowdown
				label: 'Year'        // year label
			},
		month: { 
				format: 'MMM',       // how should hour be forrmated in drowdown
				label: 'Month',      // month label
				names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 
				namesAbbr: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
			},
		day: { 
				format: 'd',         // how should hour be forrmated in drowdown 
				label: 'Day',        // day label
				names: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
				namesAbbr: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
				namesHead: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
			},
		hour: {  
				format: 'HH',        // how should hour be forrmated in drowdown
				label: 'Hour',       // hour label
				am: ['AM', 'A'],     // possible am names
				pm: ['PM', 'P']     // possible pm names
			},
		minute: { 
				format: 'mm',        // how should minute be formatted in dropdown
				label: 'Minute'      // minute label
			},
		second: { 
				format: 'ss',        // how should second be formatted in dropdown
				label: 'Second'      // second label
			},
		millisecond: { 
				format: 'l',         // how should millisecond be formatted in dropdown
				label: 'Millisecond' // millisecond label
			},
		microsecond: { 
				format: 'c',         // how should millisecond be formatted in dropdown
				label: 'Microsecond' // microsecond label
			},
		timezone: { 
				format: 'z',         // how should timezone be formatted in dropdown
				label: 'Timezone'    // minute label
			}
	},
	rtl: false
};
$.intimidatetime.setDefaults($.intimidatetime.i18n['en']);
</pre>

</div>