Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rxaviers/aeb955c22c51d9c172a7 to your computer and use it in GitHub Desktop.
Save rxaviers/aeb955c22c51d9c172a7 to your computer and use it in GitHub Desktop.
$ npm install globalize
var cldr = require("cldr-data");
var Globalize = require("globalize");

Globalize.load(cldr("supplemental/likelySubtags"));

Globalize("en-US").formatNumber(3.14);
//Error: E_MISSING_CLDR: Missing required CLDR content `main/en/numbers/defaultNumberingSystem`.
//    at createError (/tmp/node_modules/globalize/dist/globalize.js:88:10)
//    at validate (/tmp/node_modules/globalize/dist/globalize.js:104:9)
//    at EventEmitter.validateCldr (/tmp/node_modules/globalize/dist/globalize.js:126:2)
//    at EventEmitter.emitEvent (/tmp/node_modules/globalize/node_modules/cldrjs/dist/cldr/event.js:416:35)
//    at EventEmitter.aliasClosure [as trigger] (/tmp/node_modules/globalize/node_modules/cldrjs/dist/cldr/event.js:88:22)
//    at Cldr.get (/tmp/node_modules/globalize/node_modules/cldrjs/dist/cldr/event.js:572:12)
//    at Cldr.main (/tmp/node_modules/globalize/node_modules/cldrjs/dist/cldr.js:568:15)
//    at numberNumberingSystem (/tmp/node_modules/globalize/dist/globalize/number.js:437:14)
//    at numberPattern (/tmp/node_modules/globalize/dist/globalize/number.js:1089:37)
//    at Globalize.numberFormatter.Globalize.numberFormatter (/tmp/node_modules/globalize/dist/globalize/number.js:1124:13)
//

Notice en in "E_MISSING_CLDR: Missing required CLDR content main/en/numbers/defaultNumberingSystem"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment