5 <title>Globalization Demo</title>
6 <link type="text/css" rel="Stylesheet" href="browser.css">
7 <script src="../../lib/globalize.js"></script>
8 <script src="../../lib/cultures/globalize.cultures.js"></script>
9 <script src="jquery-1.4.4.js"></script>
10 <script src="jquery.tmpl.js"></script>
11 <script src="browser.js"></script>
12 <script id="formattmpl" type="text/x-jquery-tmpl">
32 <script id="dateformattmpl" type="text/x-jquery-tmpl">
44 {{each(j) dateFormats}}
46 {{demoDateFormat(i) j}}
52 <script id="infonumbertmpl" type="text/x-jquery-tmpl">
53 <legend>Number Formatting</legend>
59 <td>${decimals} (${$data['.']})</td>
63 <td>${$data[',']}</td>
65 <td>${groupSizes}</td>
69 <td>${$data['+']}</td>
71 <td>${$data['-']}</td>
74 <td colspan="4" align="center">Percent (symbol = ${percent.symbol})</td>
78 <td>${percent.pattern}</td>
80 <td>${percent.decimals} (${percent['.']})</td>
84 <td>${percent[',']}</td>
86 <td>${percent.groupSizes}</td>
89 <td colspan="4" align="center">Currency (symbol = ${currency.symbol})</td>
93 <td>${currency.pattern}</td>
95 <td>${currency.decimals} (${currency['.']})</td>
99 <td>${currency[',']}</td>
101 <td>${currency.groupSizes}</td>
105 <script id="infodatetmpl" type="text/x-jquery-tmpl">
106 <legend>Date Formatting</legend>
110 <td colspan="3">${name}</td>
123 <li>${name} (year offset ${offset})</li>
139 <td>Days (abbreviated)</td>
142 {{each days.namesAbbr}}
149 <td>Days (shortest)</td>
152 {{each days.namesShort}}
162 {{each months.names}}
169 <td>Months (abbreviated)</td>
172 {{each months.namesAbbr}}
178 {{if typeof monthsGenitive !== 'undefined'}}
180 <td>Months (Genitive)</td>
181 <td>${monthsGenitive.names}</td>
182 <td>Months (Abbr. Gen.)</td>
183 <td>${monthsGenitive.namesAbbr}</td>
187 <td align="center" colspan="4">Patterns</td>
189 {{each(n,v) patterns}}
192 <td colspan="3">{{=}}</td>
201 This is a demo of the Globalize library. You can follow the discussion and provide feedback on the planning page, here:
202 <br/><a href="http://wiki.jqueryui.com/Globalization">Globalization wiki page</a>
204 And you can view the source from here or keep up to date with it on github, here:
205 <br/><a href="https://github.com/jquery/globalize/">Globalize on GitHub</a>
210 <select id="cultures"></select>
214 <select id="calendars"></select>
218 <span class="tab active" id="dates">Dates</span>
219 <span class="tab inactive" id="numbers">Numbers</span>
220 <span class="tab inactive" id="info">Info</span>
222 <div id="datescontent" class="active">
223 <table id="dateformat" class="results">
225 <b>Parsing:</b> Type a date in one of the culture formats:
226 <input id="parseDate" type="text" /><span id="parseDateResult"></span>
229 <div id="numberscontent" class="inactive">
230 <table id="format" class="results">
232 <b>Parsing:</b> Type a number using the culture group and decimal separators:
233 <input id="parseNumber" type="text" /><span id="parseNumberResult"></span>
236 <div id="infocontent" class="inactive">
238 Name (in English) "<span id="englishName"></span>"<br />
239 Name (in Native Language) "<span id="nativeName"></span>".<br />
240 Is RTL culture? <span id="isRTL"></span>.
242 <fieldset id="infonumber" class="info">
244 <fieldset id="infodate" class="info">
252 Interesting cultures to preview:
254 <li>ja-JP: Has an optional calendar that has 4 different eras.</li>
255 <li>th-TH: Standard calendar has a year offset.</li>
256 <li>te-IN: Numbers have unequal groupings.</li>
257 <li>ar-SA: Standard calendar is UmAlQura, a non-gregorian based calendar that requires custom conversion logic.
258 It also supports the Hijri calendar, and a standard gregorian calendar translated into one of <i>4 languages</i>.