Skip to content

Instantly share code, notes, and snippets.

@auramo
Created January 18, 2015 18:05
Show Gist options
  • Save auramo/7fa80631ae68acb4ea37 to your computer and use it in GitHub Desktop.
Save auramo/7fa80631ae68acb4ea37 to your computer and use it in GitHub Desktop.
var initGlobalize = function() {
function init(callbacks) {
$.when(
$.get("/cldr/main/fi/ca-gregorian.json"),
$.get("/cldr/main/fi/currencies.json"),
$.get("/cldr/main/fi/numbers.json"),
$.get("/cldr/supplemental/currencyData.json"),
$.get("/cldr/supplemental/likelySubtags.json"),
$.get("/cldr/supplemental/timeData.json"),
$.get("/cldr/supplemental/weekData.json")
).then(function() {
// Normalize $.get results, we only need the JSON, not the request statuses.
return [].slice.apply(arguments, [0]).map(function(result) {
return result[0];
});
}).then(Globalize.load).then(function() {
runFiscalClient();
});
}
return init;
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment