~2 min read • Updated Dec 29, 2025
1. Internationalization Features in Node.js
- Unicode-aware functions like
String.prototype.normalize(),toLowerCase(), andtoUpperCase(). - The
Intlobject and locale-sensitive methods such aslocaleCompare()andDate.prototype.toLocaleString(). - IDN support in the WHATWG URL parser.
- Utilities like
buffer.transcode()andutil.TextDecoder. - Support for
RegExp Unicode Property Escapes.
2. Build Options for ICU
Four main options control ICU usage when compiling Node.js:
- none: Disables ICU; most internationalization features are unavailable.
- system-icu: Links against ICU installed on the system. Support depends on available locale data.
- small-icu: Embeds limited ICU data (usually English-only) in the binary.
- full-icu: Embeds the full ICU dataset. Default in official Node.js binaries.
3. Feature Comparison
| Feature | none | system-icu | small-icu | full-icu |
|---|---|---|---|---|
| normalize() | disabled | full | full | full |
| Intl | disabled | partial/full | partial (English-only) | full |
| localeCompare() | not locale-aware | full | full | full |
| Date.toLocaleString() | not locale-aware | partial/full | partial (English-only) | full |
| TextDecoder | basic | partial/full | Unicode-only | full |
| RegExp Unicode | disabled | full | full | full |
4. Providing ICU Data at Runtime
With small-icu, additional ICU data can be loaded at runtime:
- Using the
--icu-data-dirCLI option. - Setting the
NODE_ICU_DATAenvironment variable. - Configuring
--with-icu-default-data-dirat build time.
The full-icu npm module simplifies installation by downloading the correct ICU dataset for the running Node.js version.
5. Detecting ICU Support
typeof Intl === 'object': Checks if Intl is available.typeof process.versions.icu === 'string': Confirms ICU is enabled.- Testing
Intl.DateTimeFormatwith non-English locales verifies full ICU support.
6. Example
const january = new Date(9e8);
const spanish = new Intl.DateTimeFormat('es', { month: 'long' });
console.log(spanish.format(january)); // "enero" with full-icu
Conclusion
Internationalization support in Node.js, powered by ICU, enables developers to build multilingual and locale-sensitive applications. Depending on project needs, developers can choose between none, system-icu, small-icu, or full-icu. Full-icu provides the richest feature set, while small-icu balances binary size with basic functionality.
Written & researched by Dr. Shahin Siami