Globalize formats and parses numbers, dates, and messages using official Unicode CLDR JSON data. It runs in browsers and as a Node.js module with modular feature packages.
Overview
Globalize is a JavaScript internationalization and localization library built on the official Unicode CLDR JSON datasets. It helps applications present numbers, currencies, percentages, dates, times, plural rules, relative times, units, and messages the way speakers of each locale expect.
Users can enter values in local formats and have them parsed into real numbers and dates, then formatted back for display. Even English-only apps can use it for human-friendly relative times and other locale-sensitive output instead of raw timestamps.
The project splits functionality into modules such as number, currency, date, message, plural, relative time, and unit handling, plus core utilities and optional compiled runtime pieces for performance. You load only the CLDR data and modules needed for your locales and features.
Globalize targets both browser and Node.js environments. Documentation covers migration from older releases, error references, and examples for assembling the right data slices and API calls.
Key features
- Unicode CLDR JSON locale data
- Number, currency, and percent formatting
- Date and time parsing and display
- Message and plural rule support
- Relative time and unit modules
- Modular packages for browser or Node.js
- Parse user locale input into typed values
Use cases
- Formatting dates and numbers per user locale
- Parsing locale-specific user input fields
- Building multilingual web or Node.js apps
- Loading only required CLDR slices
- Human-readable relative timestamps in UI