Skip to content

Conversation

@LuisMerinoP
Copy link
Contributor

@LuisMerinoP LuisMerinoP commented Sep 28, 2025

Description

First major step toward full ECMA-402 internationalization support in Jint by wiring the engine to the ICU (International Components for Unicode) library provided by the host operating system.

What’s included

  • Implemented Intl.getCanonicalLocales() and CanonicalizeLocaleList() following the ECMA-402 spec.

  • Added ICU bindings (uloc_forLanguageTag, uloc_canonicalize, uloc_toLanguageTag) to validate, parse, and canonicalize BCP-47 language tags using the system ICU library.

  • Implemented normalization logic that mirrors WebKit’s behavior (Webkit code is far more readable than v8).

While this PR focuses mainly on Intl.getCanonicalLocales and locale canonicalization, it establishes the foundation for full internationalization support — unlocking future implementation of Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat etc. With the tests already in place, to incrementally implement by fixing is relavely doable.

Number of tests fixed:

main branch this branch
✅ Passed 54 396
❌ Failed 2418 2076

Across platform testing:

This was done on windows. Maybe needs testing in other OSs.

@LuisMerinoP LuisMerinoP marked this pull request as ready for review September 28, 2025 02:56
@LuisMerinoP LuisMerinoP force-pushed the internationalization-kick-off branch from 4b8280c to 9c0b107 Compare September 28, 2025 03:38
@LuisMerinoP
Copy link
Contributor Author

Any comments from the maintiners? Wonder if is there any interest on this :)
@lahma , @sebastienros?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant