ladybird/Userland/Libraries/LibUnicode/PluralRules.h
Timothy Flynn ebdb92eef6 LibUnicode+Everywhere: Merge LibLocale back into LibUnicode
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.
2024-06-23 19:52:45 +02:00

35 lines
642 B
C++

/*
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/StringView.h>
namespace Unicode {
enum class PluralForm {
Cardinal,
Ordinal,
};
PluralForm plural_form_from_string(StringView);
StringView plural_form_to_string(PluralForm);
enum class PluralCategory {
Other,
Zero,
One,
Two,
Few,
Many,
// https://unicode.org/reports/tr35/tr35-numbers.html#Explicit_0_1_rules
ExactlyZero,
ExactlyOne,
};
PluralCategory plural_category_from_string(StringView);
StringView plural_category_to_string(PluralCategory);
}