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 605 forks source link

Globalize Numberformatter issue #872

Open osdev25 opened 5 years ago

osdev25 commented 5 years ago

Hi everyone ,

i just upgraded to the latest version of globalize with latest json cldr data.

im trying to format a value using the fallowing format :

var currencyFormatter = Globalize('en-GB').currencyFormatter('GBP', {compact:"short"});

console.log(currencyFormatter(value));

but i get an exception at :

Uncaught TypeError: this.pluralGenerator is not a function at Globalize.numberFormatter.Globalize.numberFormatter (number.js:1506) at Globalize.currencyFormatter.Globalize.currencyFormatter (currency.js:377)

if i remove {compact:"short"} everything works fine.

any idea please.Thanks