mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
LibUnicode: Generate numeric keyword values for each locale
This is needed for Intl.NumberFormat's usage of the ResolveLocale AO, where the [[RelevantExtensionKeys]] internal slot will be "nu".
This commit is contained in:
parent
f5de4f24b2
commit
b1d4bcf364
3 changed files with 58 additions and 0 deletions
|
@ -790,6 +790,15 @@ Optional<StringView> get_locale_currency_mapping([[maybe_unused]] StringView loc
|
|||
#endif
|
||||
}
|
||||
|
||||
Vector<StringView> get_locale_key_mapping([[maybe_unused]] StringView locale, [[maybe_unused]] StringView keyword)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
if (auto values = Detail::get_locale_key_mapping(locale, keyword); values.has_value())
|
||||
return values->split_view(',');
|
||||
#endif
|
||||
return {};
|
||||
}
|
||||
|
||||
Optional<ListPatterns> get_locale_list_patterns([[maybe_unused]] StringView locale, [[maybe_unused]] StringView type, [[maybe_unused]] StringView style)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue