summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibUnicode
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-07-14 13:14:11 -0400
committerAndreas Kling <kling@serenityos.org>2022-07-15 12:31:43 +0200
commitf8f70154196f8fc56a6572c20cfbf4dd664a95c4 (patch)
tree208c127230567d3e658258a3fd95b8876d0d4610 /Userland/Libraries/LibUnicode
parent80568d57767ea3898f95565a158d2fca460ec235 (diff)
downloadserenity-f8f70154196f8fc56a6572c20cfbf4dd664a95c4.zip
LibUnicode: Generate a method to lookup locale-preferred keyword values
Diffstat (limited to 'Userland/Libraries/LibUnicode')
-rw-r--r--Userland/Libraries/LibUnicode/Locale.cpp1
-rw-r--r--Userland/Libraries/LibUnicode/Locale.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibUnicode/Locale.cpp b/Userland/Libraries/LibUnicode/Locale.cpp
index d5870d0329..6f5f56c7cd 100644
--- a/Userland/Libraries/LibUnicode/Locale.cpp
+++ b/Userland/Libraries/LibUnicode/Locale.cpp
@@ -788,6 +788,7 @@ Optional<KeywordColCaseFirst> __attribute__((weak)) keyword_kf_from_string(Strin
Optional<KeywordColNumeric> __attribute__((weak)) keyword_kn_from_string(StringView) { return {}; }
Optional<KeywordNumbers> __attribute__((weak)) keyword_nu_from_string(StringView) { return {}; }
Vector<StringView> __attribute__((weak)) get_keywords_for_locale(StringView, StringView) { return {}; }
+Optional<StringView> __attribute__((weak)) get_preferred_keyword_value_for_locale(StringView, StringView) { return {}; }
Optional<DisplayPattern> __attribute__((weak)) get_locale_display_patterns(StringView) { return {}; }
Optional<StringView> __attribute__((weak)) get_locale_language_mapping(StringView, StringView) { return {}; }
Optional<StringView> __attribute__((weak)) get_locale_territory_mapping(StringView, StringView) { return {}; }
diff --git a/Userland/Libraries/LibUnicode/Locale.h b/Userland/Libraries/LibUnicode/Locale.h
index 3fdf1bf445..a665bfd8a1 100644
--- a/Userland/Libraries/LibUnicode/Locale.h
+++ b/Userland/Libraries/LibUnicode/Locale.h
@@ -172,6 +172,7 @@ Optional<KeywordColCaseFirst> keyword_kf_from_string(StringView kf);
Optional<KeywordColNumeric> keyword_kn_from_string(StringView kn);
Optional<KeywordNumbers> keyword_nu_from_string(StringView nu);
Vector<StringView> get_keywords_for_locale(StringView locale, StringView key);
+Optional<StringView> get_preferred_keyword_value_for_locale(StringView locale, StringView key);
Optional<DisplayPattern> get_locale_display_patterns(StringView locale);
Optional<String> format_locale_for_display(StringView locale, LocaleID locale_id);