mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 15:19:16 +00:00
LibLocale was split off from LibUnicode a couple years ago to reduce the number of applications on SerenityOS that depend on CLDR data. Now that we use ICU, both LibUnicode and LibLocale are actually linking in this data. And since vcpkg gives us static libraries, both libraries are over 30MB in size. This patch reverts the separation and merges LibLocale into LibUnicode again. We now have just one library that includes the ICU data. Further, this will let LibUnicode share the locale cache that previously would only exist in LibLocale.
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
/*
|
|
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Optional.h>
|
|
#include <AK/String.h>
|
|
#include <AK/StringView.h>
|
|
#include <LibTimeZone/TimeZone.h>
|
|
#include <LibUnicode/Locale.h>
|
|
|
|
namespace Unicode {
|
|
|
|
enum class LanguageDisplay {
|
|
Standard,
|
|
Dialect,
|
|
};
|
|
|
|
LanguageDisplay language_display_from_string(StringView language_display);
|
|
StringView language_display_to_string(LanguageDisplay language_display);
|
|
|
|
Optional<String> language_display_name(StringView locale, StringView language, LanguageDisplay);
|
|
Optional<String> region_display_name(StringView locale, StringView region);
|
|
Optional<String> script_display_name(StringView locale, StringView script);
|
|
Optional<String> calendar_display_name(StringView locale, StringView calendar);
|
|
Optional<String> date_time_field_display_name(StringView locale, StringView field, Style);
|
|
Optional<String> time_zone_display_name(StringView locale, StringView time_zone_identifier, TimeZone::InDST, double time);
|
|
Optional<String> currency_display_name(StringView locale, StringView currency, Style);
|
|
Optional<String> currency_numeric_display_name(StringView locale, StringView currency);
|
|
|
|
}
|