globalize
Version:
A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data.
29 lines (17 loc) • 603 B
Markdown
string or [Cldr instance](https://github.com/rxaviers/cldrjs) of the instance.
Prior to creating any Globalize instance, you must load `cldr/supplemental/likelySubtags.json`. Read [CLDR content][] if you need more information.
[ ]: ../../../README.md
```javascript
var en = new Globalize( "en" );
// You can optionally omit the `new` operator.
var pt = Globalize( "pt" );
en.formatNumber( 3.1415 );
// > 3.142
pt.formatNumber( 3.1415 );
// > 3,142
```
Create a Globalize instance.
Locale