Loading AI tools
Cross-platform JavaScript library From Wikipedia, the free encyclopedia
Globalize is a cross-platform JavaScript library for internationalization and localization that uses the Unicode Common Locale Data Repository (CLDR).
![]() | |
Original author(s) | Rafael Xavier de Souza |
---|---|
Developer(s) | jQuery Foundation |
Initial release | April 23, 2015 |
Stable release | |
Repository | |
Written in | JavaScript |
Platform | See Browser support |
Type | JavaScript library |
License | MIT License[2] |
Website | github |
Globalize provides number formatting and parsing, date and time formatting and parsing, currency formatting, unit formatting, message formatting (ICU message format pattern), and plural support.
Design Goals:
Globalize is based on the Unicode Consortium's Common Locale Data Repository (CLDR), the largest and most extensive standard repository of locale data available. CLDR is constantly updated and is used by many large applications and operating systems, to always have access to the most accurate and up-to-date locale data.
Since Globalize doesn't bundle any localization data, it has to be first initialized using some CLDR content:
var Globalize = require( "globalize" );
Globalize.load( require( "cldr-data" ).entireSupplemental() );
Globalize.load( require( "cldr-data" ).entireMainFor( "en", "es" ) );
Globalize("en").formatDate(new Date());
// > "11/27/2015"
Globalize("es").formatDate(new Date());
// > "27/11/2015"
Globalize was first announced in October 2010 by John Resig[3] and originally developed by David Reed, sponsored by Microsoft, under the name jQuery Globalization plugin,[4] built on top of an export of the .net locale database.[5] From there the dependency on jQuery was removed[6] and the project renamed to Globalize.[7] In a much larger effort, the project was entirely rewritten on top of Unicode's CLDR, making use of its comprehensive and accurate coverage of all kinds of localization data.[8]
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.