globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 603 forks source link

Got error in example #815

Closed ButuzGOL closed 6 years ago

ButuzGOL commented 6 years ago

webpack config

new GlobalizePlugin({
  developmentLocale: 'en',
}),

code

var en = new Globalize( "en" );

// You can optionally omit the `new` operator.
var pt = Globalize( "pt" );

console.log(en.formatNumber( 3.1415 ));
// > 3.142

console.log(pt.formatNumber( 3.1415 ));

output

Uncaught Error: E_MISSING_CLDR: Missing required CLDR content `main/pt/numbers/defaultNumberingSystem`.
    at createError (globalize.js:105)
    at validate (globalize.js:182)
rxaviers commented 6 years ago

Have you loaded pt data?