You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UTS#35 has algorithms to add or remove likely subtags for a locale. This is useful for instance when wanting to use \Locale::getScript to get the script associated with a locale, to get the likely script instead of getting null when the locale string does not specify a script explicitly.
ICU4X (the Rust implementation of ICU) has a LocaleExpander class with maximize and minimize methods: https://unicode-org.github.io/icu4x/rustdoc/icu/locale/struct.LocaleExpander.html (their implementation mutates the identifier object in place and returns an info about whether it was modified or no, but the PHP implementation should likely return the new string instead as PHP does not use objects for language identifiers anyway).
ICU4C has functions uloc_addLikelySubtags and uloc_minimizeSubtags
It would be great to expose this ICU capability to PHP code.
The text was updated successfully, but these errors were encountered:
Description
UTS#35 has algorithms to add or remove likely subtags for a locale. This is useful for instance when wanting to use
\Locale::getScript
to get the script associated with a locale, to get the likely script instead of gettingnull
when the locale string does not specify a script explicitly.ICU4X (the Rust implementation of ICU) has a
LocaleExpander
class withmaximize
andminimize
methods: https://unicode-org.github.io/icu4x/rustdoc/icu/locale/struct.LocaleExpander.html (their implementation mutates the identifier object in place and returns an info about whether it was modified or no, but the PHP implementation should likely return the new string instead as PHP does not use objects for language identifiers anyway).ICU4C has functions uloc_addLikelySubtags and uloc_minimizeSubtags
It would be great to expose this ICU capability to PHP code.
The text was updated successfully, but these errors were encountered: