Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$.when(
$.get( "cldr/main/en/ca-gregorian.json" ),
$.get( "cldr/main/fr/ca-gregorian.json" ),
$.get( "cldr/supplemental/likelySubtags.json" ),
$.get( "cldr/supplemental/timeData.json" ),
$.get( "cldr/supplemental/weekData.json" )
).then(function() {
return [].slice.apply( arguments, [ 0 ] ).map(function( result ) {
return result[ 0 ];
});
}).then( Globalize.load );
//Instantier jQuery.Globalize dans une culture
Globalize("en") //Cette culture peut être fournie par votre backend MVC, par exemple System.Threading.Thread.CurrentThread.CurrentCulture
//L'initialisation des règles peronnalisées pour jQuery.Validate se fait ici.
$.validator.methods.date = function (value, element) {
return this.optional(element) || Globalize.parseDate(value);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.