mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +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
Notes:
sideshowbarker
2024-07-18 04:18:22 +09:00
Author: https://github.com/trflynn89
Commit: b1d4bcf364
Pull-request: https://github.com/SerenityOS/serenity/pull/9945
Reviewed-by: https://github.com/linusg ✅
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