Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
 
Add your own
alternative version

Exploring Globalization with jQuery

, 13 Feb 2011 CPOL
This article discusses another official plugin of jQuery that is Globalization
Sample_application.zip
Sample application
scripts
globinfo
jQueryUI
(function(m){var gb="كانون الأول",fb="تشرين الثاني",eb="تشرين الأول",db="كانون الثاني",S="dddd, MMMM dd, yyyy hh:mm:ss tt",R="dddd, MMMM dd, yyyy hh:mm tt",Q="MM/dd/yyyy",X="اكتوبر",y=8.64e7,cb=-2.1987072e12,bb="dd/MM/yy",k=null,ab="بعد الهجرة",P="ذو الحجة",O="ذو القعدة",N="شوال",M="رمضان",L="شعبان",K="رجب",J="جمادى الثانية",I="جمادى الأولى",H="ربيع الثاني",G="ربيع الأول",F="صفر",E="محرم",D="dd MMMM",o="hh:mm:ss tt",n="hh:mm tt",Z="dd/MM/yyyy",a="م",b="ص",c="",x="ديسمبر",w="نوفمبر",W="أكتوبر",v="سبتمبر",V="أغسطس",C="يونيو",B="مايو",U="أبريل",u="مارس",A="فبراير",z="يناير",t="س",s="ج",r="خ",q="ث",j="السبت",i="الجمعة",h="الخميس",g="الأربعاء",f="الثلاثاء",e="الإثنين",d="الأحد",l=true,T="ar-EG",Y=m.cultures,ib=Y.en,p=ib.calendars.standard,hb=Y[T]=m.extend(l,{},ib,{name:T,englishName:"Arabic (Egypt)",nativeName:"العربية (مصر)",language:"ar",isRTL:l,numberFormat:{pattern:["n-"],decimals:3,percent:{decimals:3},currency:{pattern:["$n-","$ n"],symbol:"ج.م.‏"}},calendars:{standard:m.extend(l,{},p,{firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["ح","ن",q,"ر",r,s,t]},months:{names:[z,A,u,U,B,C,"يوليه",V,v,W,w,x,c],namesAbbr:[z,A,u,U,B,C,"يوليه",V,v,W,w,x,c]},AM:[b,b,b],PM:[a,a,a],patterns:{d:Z,D:"dd MMMM, yyyy",t:n,T:o,f:"dd MMMM, yyyy hh:mm tt",F:"dd MMMM, yyyy hh:mm:ss tt",M:D}}),UmAlQura:m.extend(l,{},p,{name:"UmAlQura",firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["ح","ن",q,"ر",r,s,t]},months:{names:[E,F,G,H,I,J,K,L,M,N,O,P,c],namesAbbr:[E,F,G,H,I,J,K,L,M,N,O,P,c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:ab,start:k,offset:0}],twoDigitYearMax:1451,patterns:{d:bb,D:"dd/MMMM/yyyy",t:n,T:o,f:"dd/MMMM/yyyy hh:mm tt",F:"dd/MMMM/yyyy hh:mm:ss tt",M:D},convert:{_yearInfo:[[746,cb],[1769,-2.1681216e12],[3794,-2.1374496e12],[3748,-2.1067776e12],[3402,-2.076192e12],[2710,-2.0456064e12],[1334,-2.0150208e12],[2741,-1.9844352e12],[3498,-1.9537632e12],[2980,-1.9230912e12],[2889,-1.8925056e12],[2707,-1.86192e12],[1323,-1.8313344e12],[2647,-1.8007488e12],[1206,-1.7700768e12],[2741,-1.7394912e12],[1450,-1.7088192e12],[3413,-1.6782336e12],[3370,-1.6475616e12],[2646,-1.616976e12],[1198,-1.5863904e12],[2397,-1.5558048e12],[748,-1.5251328e12],[1749,-1.4945472e12],[1706,-1.4638752e12],[1365,-1.4332896e12],[1195,-1.402704e12],[2395,-1.3721184e12],[698,-1.3414464e12],[1397,-1.3108608e12],[2994,-1.2801888e12],[1892,-1.2495168e12],[1865,-1.2189312e12],[1621,-1.1883456e12],[683,-1.15776e12],[1371,-1.1271744e12],[2778,-1.0965024e12],[1748,-1.0658304e12],[3785,-1.0352448e12],[3474,-1.0045728e12],[3365,-9.739872e11],[2637,-9.434016e11],[685,-9.12816e11],[1389,-8.822304e11],[2922,-8.515584e11],[2898,-8.208864e11],[2725,-7.903008e11],[2635,-7.597152e11],[1175,-7.291296e11],[2359,-6.98544e11],[694,-6.67872e11],[1397,-6.372864e11],[3434,-6.066144e11],[3410,-5.759424e11],[2710,-5.453568e11],[2349,-5.147712e11],[605,-4.841856e11],[1245,-4.536e11],[2778,-4.22928e11],[1492,-3.92256e11],[3497,-3.616704e11],[3410,-3.309984e11],[2730,-3.004128e11],[1238,-2.698272e11],[2486,-2.392416e11],[884,-2.085696e11],[1897,-1.77984e11],[1874,-1.47312e11],[1701,-1.167264e11],[1355,-8.61408e10],[2731,-5.55552e10],[1370,-2.48832e10],[2773,5.7024e9],[3538,3.63744e10],[3492,6.70464e10],[3401,9.7632e10],[2709,1.282176e11],[1325,1.588032e11],[2653,1.893888e11],[1370,2.200608e11],[2773,2.506464e11],[1706,2.813184e11],[1685,3.11904e11],[1323,3.424896e11],[2647,3.730752e11],[1198,4.037472e11],[2422,4.343328e11],[1388,4.650048e11],[2901,4.955904e11],[2730,5.262624e11],[2645,5.56848e11],[1197,5.874336e11],[2397,6.180192e11],[730,6.486912e11],[1497,6.792768e11],[3506,7.099488e11],[2980,7.406208e11],[2890,7.712064e11],[2645,8.01792e11],[693,8.323776e11],[1397,8.629632e11],[2922,8.936352e11],[3026,9.243072e11],[3012,9.549792e11],[2953,9.855648e11],[2709,1.0161504e12],[1325,1.046736e12],[1453,1.0773216e12],[2922,1.1079936e12],[1748,1.1386656e12],[3529,1.1692512e12],[3474,1.1999232e12],[2726,1.2305088e12],[2390,1.2610944e12],[686,1.29168e12],[1389,1.3222656e12],[874,1.3529376e12],[2901,1.3835232e12],[2730,1.4141952e12],[2381,1.4447808e12],[1181,1.4753664e12],[2397,1.505952e12],[698,1.536624e12],[1461,1.5672096e12],[1450,1.5978816e12],[3413,1.6284672e12],[2714,1.6591392e12],[2350,1.6897248e12],[622,1.7203104e12],[1373,1.750896e12],[2778,1.781568e12],[1748,1.81224e12],[1701,1.8428256e12],[0,1.8734112e12]],minDate:cb,maxDate:1873411199999,toGregorian:function(h,g,i){var d=i-1,c=h-1318;if(c<0||c>=this._yearInfo.length)return k;var e=this._yearInfo[c],a=new Date(e[1]),b=e[0];a.setMinutes(a.getMinutes()+a.getTimezoneOffset());for(var f=0;f<g;f++){d+=29+(b&1);b=b>>1}a.setDate(a.getDate()+d);return a},fromGregorian:function(h){var b=this,c=h-h.getTimezoneOffset()*6e4;if(c<b.minDate||c>b.maxDate)return k;var a=0,g=1;while(c>b._yearInfo[++a][1]);if(c!==b._yearInfo[a][1])a--;var i=b._yearInfo[a],f=Math.floor((c-i[1])/y),d=i[0];a+=1318;var e=29+(d&1);while(f>=e){f-=e;d=d>>1;e=29+(d&1);g++}return[a,g-1,f+1]}}}),Gregorian_TransliteratedEnglish:m.extend(l,{},p,{name:"Gregorian_TransliteratedEnglish",firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["أ","ا",q,"أ",r,s,t]},months:{names:[z,A,u,U,B,C,"يوليو",V,v,W,w,x,c],namesAbbr:[z,A,u,"ابريل",B,C,"يوليو","اغسطس",v,X,w,x,c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:a,start:k,offset:0}],patterns:{d:Q,t:n,T:o,f:R,F:S}}),Hijri:m.extend(l,{},p,{name:"Hijri",firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["ح","ن",q,"ر",r,s,t]},months:{names:[E,F,G,H,I,J,K,L,M,N,O,P,c],namesAbbr:[E,F,G,H,I,J,K,L,M,N,O,P,c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:ab,start:k,offset:0}],twoDigitYearMax:1451,patterns:{d:bb,D:Z,t:n,T:o,f:"dd/MM/yyyy hh:mm tt",F:"dd/MM/yyyy hh:mm:ss tt",M:D},convert:{ticks1970:6.21355968e13,monthDays:[0,30,59,89,118,148,177,207,236,266,295,325,355],minDate:-4.25216736e13,maxDate:0xe677d21fdbff,hijriAdjustment:0,toGregorian:function(e,d,f){var a=this,c=a.daysToYear(e)+a.monthDays[d]+f-1-a.hijriAdjustment,b=new Date(c*y-a.ticks1970);b.setMinutes(b.getMinutes()+b.getTimezoneOffset());return b},fromGregorian:function(f){var a=this;if(f<a.minDate||f>a.maxDate)return k;var j=a.ticks1970+(f-0)-f.getTimezoneOffset()*6e4,e=Math.floor(j/y)+1+a.hijriAdjustment,i,c,d=Math.floor((e-227013)*30/10631)+1,b=a.daysToYear(d),g=a.isLeapYear(d)?355:354;if(e<b){d--;b-=g}else if(e===b){d--;b=a.daysToYear(d)}else if(e>b+g){b+=g;d++}c=0;var h=e-b;while(c<=11&&h>a.monthDays[c])c++;c--;i=h-a.monthDays[c];return[d,c,i]},daysToYear:function(d){var b=Math.floor((d-1)/30)*30,a=d-b-1,c=Math.floor(b*10631/30)+227013;while(a>0){c+=this.isLeapYear(a)?355:354;a--}return c},isLeapYear:function(a){return(a*11+14)%30<11}}}),Gregorian_MiddleEastFrench:m.extend(l,{},p,{name:"Gregorian_MiddleEastFrench",firstDay:6,days:{names:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],namesAbbr:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],namesShort:["di","lu","ma","me","je","ve","sa"]},months:{names:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",c],namesAbbr:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:"ap. J.-C.",start:k,offset:0}],patterns:{d:Q,t:n,T:o,f:R,F:S,M:D}}),Gregorian_Arabic:m.extend(l,{},p,{name:"Gregorian_Arabic",firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["ح","ن",q,"ر",r,s,t]},months:{names:[db,"شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول",eb,fb,gb,c],namesAbbr:[db,"شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول",eb,fb,gb,c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:a,start:k,offset:0}],patterns:{d:Q,t:n,T:o,f:R,F:S}}),Gregorian_TransliteratedFrench:m.extend(l,{},p,{name:"Gregorian_TransliteratedFrench",firstDay:6,days:{names:[d,e,f,g,h,i,j],namesAbbr:[d,e,f,g,h,i,j],namesShort:["ح","ن",q,"ر",r,s,t]},months:{names:["جانفييه","فيفرييه",u,"أفريل","مي","جوان","جوييه","أوت",v,X,w,x,c],namesAbbr:["جانفييه","فيفرييه",u,"أفريل","مي","جوان","جوييه","أوت",v,X,w,x,c]},AM:[b,b,b],PM:[a,a,a],eras:[{name:a,start:k,offset:0}],patterns:{d:Q,t:n,T:o,f:R,F:S}})}},Y[T]);hb.calendar=hb.calendars.standard})(jQuery)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Brij
Software Developer (Senior)
India India
Brij is a 3-times Microsoft MVP in ASP.NET/IIS Category and a passionate .NET developer. More than 6 years of experience in IT field, currently serving a MNC as a Tech Lead/Architect.
 
He is a very passionate .NET developer and have expertise over Web technologies like ASP.NET 2.0/3.5/4.0, jQuery, JSON, Javascript, IIS and related technologies. He is also a Exchange Server (EWS) Specialist. He has great experience in design patterns and N-Tier Architecture.
 
He is also certified as Microsoft Certified Technologies Specialist-ASP.NET and Microsoft Certified Technologies Specialist-WCF in .NET 4.0. He has also received several awards at various forums and his various articles got listed as "Article of the day" at ASP.NET Microsoft Official Website www.asp.net.
 
He has done MCA from NIT Durgapur and completed his graduation from Lucknow University.
 
Learning new technologies and sharing knowledge excites him most. Blogging, solving problems at various forums, helping people, keeps him busy entire day.


Visit his Blog: Brij's arena of .NET
 
Area of Expertise :
C#, ASP.NET 2.0,3.5,4.0, AJAX, JQuery, JSON, XML, XSLT, ADO.Net, WCF, Active Directory, Exchange Server 2007 (EWS), Java script, Web Services ,Win services, DotnetNuke, WSS 3.0,Sharepoint Designer, SQL Server 2000/2005/2008
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141223.1 | Last Updated 13 Feb 2011
Article Copyright 2011 by Brij
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid