GocciaScript differences: Requires system ICU library for full functionality. Falls back to embedded CLDR data when ICU is unavailable.
Executive Summary
ECMA-402 conformance -- Implements the Internationalization API with locale-aware formatting for numbers, dates, lists, durations, and relative time
Data strategy -- System ICU library as primary data source, embedded CLDR resource as fallback for single-binary portability
Locale negotiation -- BCP 47 locale identifiers with Unicode extension keys, best-fit and lookup matching algorithms
Segmentation -- Intl.Segmenter provides Unicode-aware grapheme, word, and sentence segmentation
Collation and display -- Intl.Collator for locale-sensitive string comparison, Intl.DisplayNames for localized display of language, region, and script names
Data Strategy
Intl constructors load locale data from ICU libraries or embedded CLDR data. Lookup order is:
System ICU library (preferred for full locale coverage and up-to-date data)
Embedded CLDR resource (fallback for environments without ICU)
Platform ICU details
Platform
Library
Notes
macOS
libicucore
Ships with the OS; available on all supported macOS versions
Linux
libicui18n
Typically provided by the libicu or icu system package
Windows
icu.dll
Available on Windows 10 1903+ (shared with Temporal timezone support)
The embedded CLDR data is generated from upstream CLDR JSON distributions and linked as a FreePascal .res resource. This keeps locale data available in single-binary builds even when system ICU cannot provide the requested data. Define GOCCIA_INTL_NO_EMBEDDED_CLDR at compile time to omit the embedded fallback.
Return an array of supported values for a given key ("calendar", "collation", "currency", "numberingSystem", "timeZone", "unit")
Intl.Locale
Represents a Unicode locale identifier with parsed subtags and extension keys.
Constructor / Static
Description
new Intl.Locale(tag, options?)
Create from a BCP 47 language tag string with optional override options
Getter
Description
baseName
Base locale identifier without extension keys
calendar
Calendar type (Unicode ca extension)
caseFirst
Case-first sort order ("upper", "lower", "false")
collation
Collation type (Unicode co extension)
firstDayOfWeek
First day of the week (Unicode fw extension, "mon"…"sun"). The option accepts weekday names and the numbers 0–7; other values throw RangeError rather than being stringified (#1268)
hourCycle
Hour cycle ("h11", "h12", "h23", "h24")
language
Language subtag
numberingSystem
Numbering system (Unicode nu extension)
numeric
Whether numeric collation is enabled
region
Region subtag
script
Script subtag
variants
Variant subtags joined with - (e.g. "1996-fonipa"), or undefined