mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibUnicode: Parse and generate CLDR unit data for Intl.NumberFormat
The units data is in another CLDR package, cldr-units.
This commit is contained in:
parent
80493908d3
commit
cafb717486
5 changed files with 228 additions and 4 deletions
|
@ -20,6 +20,7 @@ enum class Locale : u16;
|
|||
enum class Property : u8;
|
||||
enum class Script : u8;
|
||||
enum class StandardNumberFormatType : u8;
|
||||
enum class Style : u8;
|
||||
enum class Territory : u8;
|
||||
enum class WordBreakProperty : u8;
|
||||
|
||||
|
|
|
@ -851,6 +851,15 @@ Optional<NumberFormat> get_standard_number_system_format([[maybe_unused]] String
|
|||
#endif
|
||||
}
|
||||
|
||||
Vector<NumberFormat> get_unit_formats([[maybe_unused]] StringView locale, [[maybe_unused]] StringView unit, [[maybe_unused]] Style style)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
return Detail::get_unit_formats(locale, unit, style);
|
||||
#else
|
||||
return {};
|
||||
#endif
|
||||
}
|
||||
|
||||
Optional<ListPatterns> get_locale_list_patterns([[maybe_unused]] StringView locale, [[maybe_unused]] StringView type, [[maybe_unused]] StringView style)
|
||||
{
|
||||
#if ENABLE_UNICODE_DATA
|
||||
|
|
|
@ -191,6 +191,7 @@ Optional<StringView> get_number_system_symbol(StringView locale, StringView syst
|
|||
Optional<NumberGroupings> get_number_system_groupings(StringView locale, StringView system);
|
||||
Optional<NumberFormat> get_standard_number_system_format(StringView locale, StringView system, StandardNumberFormatType type);
|
||||
Vector<NumberFormat> get_compact_number_system_formats(StringView locale, StringView system, CompactNumberFormatType type);
|
||||
Vector<NumberFormat> get_unit_formats(StringView locale, StringView unit, Style style);
|
||||
Optional<ListPatterns> get_locale_list_patterns(StringView locale, StringView type, StringView style);
|
||||
|
||||
Optional<StringView> resolve_language_alias(StringView language);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue