mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +00:00
LibUnicode: Add public wrapper for the generated locale_from_string
This commit is contained in:
parent
91db61ae8d
commit
12ae0a44d7
Notes:
sideshowbarker
2024-07-18 04:36:53 +09:00
Author: https://github.com/trflynn89
Commit: 12ae0a44d7
Pull-request: https://github.com/SerenityOS/serenity/pull/9841
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/linusg ✅
2 changed files with 10 additions and 0 deletions
|
@ -753,6 +753,15 @@ bool is_locale_available([[maybe_unused]] StringView locale)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Optional<Locale> locale_from_string([[maybe_unused]] StringView locale)
|
||||||
|
{
|
||||||
|
#if ENABLE_UNICODE_DATA
|
||||||
|
return Detail::locale_from_string(locale);
|
||||||
|
#else
|
||||||
|
return {};
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
Optional<StringView> get_locale_language_mapping([[maybe_unused]] StringView locale, [[maybe_unused]] StringView language)
|
Optional<StringView> get_locale_language_mapping([[maybe_unused]] StringView locale, [[maybe_unused]] StringView language)
|
||||||
{
|
{
|
||||||
#if ENABLE_UNICODE_DATA
|
#if ENABLE_UNICODE_DATA
|
||||||
|
|
|
@ -119,6 +119,7 @@ Optional<String> canonicalize_unicode_locale_id(LocaleID&);
|
||||||
|
|
||||||
String const& default_locale();
|
String const& default_locale();
|
||||||
bool is_locale_available(StringView locale);
|
bool is_locale_available(StringView locale);
|
||||||
|
Optional<Locale> locale_from_string(StringView locale);
|
||||||
|
|
||||||
Optional<StringView> get_locale_language_mapping(StringView locale, StringView language);
|
Optional<StringView> get_locale_language_mapping(StringView locale, StringView language);
|
||||||
Optional<StringView> get_locale_territory_mapping(StringView locale, StringView territory);
|
Optional<StringView> get_locale_territory_mapping(StringView locale, StringView territory);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue