12#include "../utility/utility.hpp"
13#include "../i18n/i18n.hpp"
14#include "../macros.hpp"
21hi_export_module(hikogui.unicode.unicode_plural);
24hi_export
namespace hi {
inline namespace v1 {
86 return static_cast<plurality_mask>(std::to_underlying(lhs) | std::to_underlying(rhs));
98 hi_axiom(not to_bool((1 << std::to_underlying(value)) & ~std::to_underlying(mask)));
108 [[nodiscard]]
constexpr size_t index(
size_t n)
const noexcept
112 auto const value_as_mask = (1 << (std::to_underlying(value) + 1)) - 1;
115 auto const i = std::popcount(narrow_cast<uint8_t>(value_as_mask & std::to_underlying(mask))) - 1;
133 unsigned long long n = 0;
137 unsigned long long f = 0;
141 unsigned long long t = 0;
159 constexpr plural_operand(std::integral
auto value) noexcept :
n(std::abs(value)),
i(narrow_cast<uint8_t>(decimal_width(value))) {}
166[[nodiscard]]
constexpr plurality cardinal_plural_bambara(plural_operand)
noexcept
171[[nodiscard]]
constexpr plurality cardinal_plural_cebuano(plural_operand op)
noexcept
173 auto const value = [&] {
175 (op.v == 0 and op.i >= 1 and op.i <= 3) or
176 (op.v == 0 and op.i % 10 != 4 and op.i % 10 != 6 and op.i % 10 != 9) or
177 (op.v != 0 and op.f % 10 != 4 and op.f % 10 != 6 and op.f % 10 != 9)) {
187[[nodiscard]]
constexpr plurality cardinal_plural_central_atlas_tamazight(plural_operand op)
noexcept
189 auto const value = [&] {
190 if (op.n == 0 or op.n == 1 or (op.n >= 11 and op.n <= 99)) {
200[[nodiscard]]
constexpr plurality cardinal_plural_icelandic(plural_operand op)
noexcept
202 auto const value = [&] {
203 if ((op.t == 0 and op.i % 10 == 1 and op.i % 100 != 11) or op.t != 0) {
213[[nodiscard]]
constexpr plurality cardinal_plural_akan(plural_operand op)
noexcept
215 auto const value = [&] {
216 if (op.n == 0 or op.n == 1) {
226[[nodiscard]]
constexpr plurality cardinal_plural_afrikaans(plural_operand op)
noexcept
228 auto const value = [&] {
239[[nodiscard]]
constexpr plurality cardinal_plural_latvian(plural_operand op)
noexcept
241 auto const value = [&] {
244 (op.n % 100 >= 11 and op.n % 100 <= 19) or
245 (op.v == 2 and op.f % 100 >= 11 and op.f % 100 <= 19)) {
248 (op.n % 10 == 1 and op.n % 100 != 11) or
249 (op.v == 2 and op.f % 10 == 1 and op.f % 100 != 11) or
250 (op.v != 2 and op.f % 10 == 1)) {
260[[nodiscard]]
constexpr plurality cardinal_plural_colognian(plural_operand op)
noexcept
262 auto const value = [&] {
265 }
else if (op.n == 1) {
275[[nodiscard]]
constexpr plurality cardinal_plural_inari_sami(plural_operand op)
noexcept
277 auto const value = [&] {
280 }
else if (op.n == 2) {
290[[nodiscard]]
constexpr plurality cardinal_plural_belarusian(plural_operand op)
noexcept
292 auto const value = [&] {
293 if (op.n % 10 == 1 and op.n % 100 != 11) {
295 }
else if (op.n % 10 >= 2 and op.n % 10 <= 4 and not (op.n % 100 >= 12 and op.n % 100 <= 14)) {
299 (op.n % 10 >= 5 and op.n % 10 <= 9) or
300 (op.n % 100 >= 11 and op.n % 100 <= 14)) {
310[[nodiscard]]
constexpr plurality cardinal_plural_polish(plural_operand op)
noexcept
312 auto const value = [&] {
314 if (op.n == 1 and op.v == 0) {
316 }
else if (op.v == 0 and (op.n % 10 >= 2 and op.n % 10 <= 4) and not (op.n % 100 >= 12 and op.n % 100 <= 14)) {
319 (op.v == 0 and op.n != 1 and op.n % 10 >= 0 and op.n % 10 <= 1) or
320 (op.v == 0 and op.n % 10 >= 5 and op.n % 10 <= 9) or
321 (op.v == 0 and op.n % 100 >= 12 and op.n % 100 <= 14)) {
331[[nodiscard]]
constexpr plurality cardinal_plural_lithuanian(plural_operand op)
noexcept
333 auto const value = [&] {
334 if (op.n % 10 == 1 and not (op.n % 100 >= 11 and op.n % 100 <= 19)) {
336 }
else if (op.n % 10 >= 2 and op.n % 10 <= 9 and not (op.n % 100 >= 11 and op.n % 100 <= 19)) {
338 }
else if (op.f != 0) {
348[[nodiscard]]
constexpr plurality cardinal_plural_bosnian(plural_operand op)
noexcept
350 auto const value = [&] {
353 (op.v == 0 and op.n % 10 == 1 and op.n % 100 != 11) or
354 (op.f % 10 == 1 and op.f % 100 != 11)) {
357 (op.v == 0 and op.n % 10 >= 2 and op.n % 10 <= 4 and not (op.n % 100 >= 12 and op.n % 100 <= 14)) or
358 (op.f % 10 >= 2 and op.f % 10 <= 4 and not (op.f % 100 >= 12 and op.n % 100 <= 14))) {
368[[nodiscard]]
constexpr plurality cardinal_plural_tachelhit(plural_operand op)
noexcept
370 auto const value = [&] {
371 if (op.i == 0 or op.n == 1) {
373 }
else if (op.n >= 2 and op.n <= 10) {
383[[nodiscard]]
constexpr plurality cardinal_plural_moldavian(plural_operand op)
noexcept
385 auto const value = [&] {
388 if (op.n == 1 and op.v == 0) {
393 (op.n % 100 >= 2 and op.n % 100 <= 19)) {
403[[nodiscard]]
constexpr plurality cardinal_plural_czech(plural_operand op)
noexcept
405 auto const value = [&] {
408 if (op.n == 1 and op.v == 0) {
410 }
else if (op.n >= 2 and op.n <= 4 and op.v == 0) {
412 }
else if (op.v != 0) {
422[[nodiscard]]
constexpr plurality cardinal_plural_manx(plural_operand op)
noexcept
424 auto const value = [&] {
427 if (op.v == 0 and op.n % 10 == 1) {
429 }
else if (op.v == 0 and op.n % 10 == 2) {
431 }
else if (op.v == 0 and (
432 op.n % 100 == 0 or op.n % 100 == 20 or op.n % 100 == 40 or op.n % 100 == 60 or op.n % 100 == 80)) {
434 }
else if (op.v != 0) {
444[[nodiscard]]
constexpr plurality cardinal_plural_scottish_gaelic(plural_operand op)
noexcept
446 auto const value = [&] {
447 if (op.n == 1 or op.n == 11) {
449 }
else if (op.n == 2 or op.n == 12) {
451 }
else if ((op.n >= 3 and op.n <= 10) or (op.n >= 13 and op.n <= 19)) {
461[[nodiscard]]
constexpr plurality cardinal_plural_breton(plural_operand op)
noexcept
463 auto const value = [&] {
464 if (op.n % 10 == 1 and op.n % 100 != 11 and op.n % 100 != 71 and op.n % 100 != 91) {
466 }
else if (op.n % 10 == 2 and op.n % 100 != 12 and op.n % 100 != 72 and op.n % 100 != 92) {
469 (op.n % 10 == 3 or op.n % 10 == 4 or op.n % 10 == 9) and
470 (not (op.n % 100 >= 10 and op.n % 100 <= 19) and
471 not (op.n % 100 >= 70 and op.n % 100 <= 79) and
472 not (op.n % 100 >= 90 and op.n % 100 <= 99))) {
474 }
else if (op.n != 0 and op.n % 1'000'000 == 0) {
484[[nodiscard]]
constexpr plurality cardinal_plural_lower_sorbian(plural_operand op)
noexcept
486 auto const value = [&] {
490 (op.v == 0 and op.n % 100 == 1) or
494 (op.v == 0 and op.n % 100 == 2) or
498 (op.v == 0 and op.n % 100 >= 3 and op.n % 100 <= 4) or
499 (op.f % 100 >= 3 and op.f % 100 <= 4)) {
509[[nodiscard]]
constexpr plurality cardinal_plural_hebrew(plural_operand op)
noexcept
511 auto const value = [&] {
514 if (op.n == 1 and op.v == 0) {
516 }
else if (op.n == 2 and op.v == 0) {
518 }
else if (op.v == 0 and not (op.n >= 0 and op.n <= 10) and op.n % 10 == 0) {
528[[nodiscard]]
constexpr plurality cardinal_plural_maltese(plural_operand op)
noexcept
530 auto const value = [&] {
533 }
else if (op.n == 0 or (op.n % 100 >= 2 and op.n % 100 <= 10)) {
535 }
else if (op.n % 100 >= 11 and op.n % 100 <= 19) {
545[[nodiscard]]
constexpr plurality cardinal_plural_irish(plural_operand op)
noexcept
547 auto const value = [&] {
550 }
else if (op.n == 2) {
552 }
else if (op.n >= 3 and op.n <= 6) {
554 }
else if (op.n >= 7 and op.n <= 10) {
564[[nodiscard]]
constexpr plurality cardinal_plural_arabic(plural_operand op)
noexcept
566 auto const value = [&] {
569 }
else if (op.n == 1) {
571 }
else if (op.n == 2) {
573 }
else if (op.n % 100 >= 3 and op.n % 100 <= 10) {
575 }
else if (op.n % 100 >= 11 and op.n % 100 <= 99) {
588[[nodiscard]]
constexpr plurality cardinal_plural_welsh(plural_operand op)
noexcept
590 auto const value = [&] {
593 }
else if (op.n == 1) {
595 }
else if (op.n == 2) {
597 }
else if (op.n == 3) {
599 }
else if (op.n == 6) {
612[[nodiscard]]
constexpr plurality cardinal_plural_cornish(plural_operand op)
noexcept
614 auto const value = [&] {
617 }
else if (op.n == 1) {
625 (op.n % 1'000 == 0 and (
626 (op.n % 100'000 >= 1'000 and op.n % 100'000 <= 20'000) or
627 op.n % 100'000 == 40'000 or
628 op.n % 100'000 == 60'000 or
629 op.n % 100'000 == 80'000)) or
630 (op.n != 0 and op.n % 1'000'000 == 100'000)) {
639 }
else if (op.n != 1 and (
658using cardinal_plural_fptr = plurality (*)(plural_operand);
660[[nodiscard]]
constexpr auto cardinal_plural_table_init() noexcept
668 for (
auto& rule_ptr : r) {
669 rule_ptr = cardinal_plural_bambara;
673 r[iso_639{
"ceb"}.intrinsic()] = cardinal_plural_cebuano;
674 r[iso_639{
"fil"}.intrinsic()] = cardinal_plural_cebuano;
675 r[iso_639{
"tl"}.intrinsic()] = cardinal_plural_cebuano;
678 r[iso_639{
"tzm"}.intrinsic()] = cardinal_plural_central_atlas_tamazight;
681 r[iso_639{
"is"}.intrinsic()] = cardinal_plural_icelandic;
682 r[iso_639{
"mk"}.intrinsic()] = cardinal_plural_icelandic;
685 r[iso_639{
"ak"}.intrinsic()] = cardinal_plural_akan;
686 r[iso_639{
"am"}.intrinsic()] = cardinal_plural_akan;
687 r[iso_639{
"hy"}.intrinsic()] = cardinal_plural_akan;
688 r[iso_639{
"as"}.intrinsic()] = cardinal_plural_akan;
689 r[iso_639{
"bn"}.intrinsic()] = cardinal_plural_akan;
690 r[iso_639{
"bh"}.intrinsic()] = cardinal_plural_akan;
691 r[iso_639{
"fr"}.intrinsic()] = cardinal_plural_akan;
692 r[iso_639{
"ff"}.intrinsic()] = cardinal_plural_akan;
694 r[iso_639{
"gu"}.intrinsic()] = cardinal_plural_akan;
695 r[iso_639{
"guw"}.intrinsic()] = cardinal_plural_akan;
696 r[iso_639{
"hi"}.intrinsic()] = cardinal_plural_akan;
697 r[iso_639{
"kab"}.intrinsic()] = cardinal_plural_akan;
698 r[iso_639{
"kn"}.intrinsic()] = cardinal_plural_akan;
699 r[iso_639{
"ln"}.intrinsic()] = cardinal_plural_akan;
700 r[iso_639{
"mg"}.intrinsic()] = cardinal_plural_akan;
701 r[iso_639{
"nso"}.intrinsic()] = cardinal_plural_akan;
703 r[iso_639{
"fa"}.intrinsic()] = cardinal_plural_akan;
704 r[iso_639{
"pt"}.intrinsic()] = cardinal_plural_akan;
705 r[iso_639{
"pa"}.intrinsic()] = cardinal_plural_akan;
706 r[iso_639{
"si"}.intrinsic()] = cardinal_plural_akan;
707 r[iso_639{
"ti"}.intrinsic()] = cardinal_plural_akan;
708 r[iso_639{
"wa"}.intrinsic()] = cardinal_plural_akan;
709 r[iso_639{
"zu"}.intrinsic()] = cardinal_plural_akan;
712 r[iso_639{
"af"}.intrinsic()] = cardinal_plural_afrikaans;
713 r[iso_639{
"sq"}.intrinsic()] = cardinal_plural_afrikaans;
714 r[iso_639{
"an"}.intrinsic()] = cardinal_plural_afrikaans;
715 r[iso_639{
"ast"}.intrinsic()] = cardinal_plural_afrikaans;
716 r[iso_639{
"asa"}.intrinsic()] = cardinal_plural_afrikaans;
717 r[iso_639{
"az"}.intrinsic()] = cardinal_plural_afrikaans;
718 r[iso_639{
"eu"}.intrinsic()] = cardinal_plural_afrikaans;
720 r[iso_639{
"bem"}.intrinsic()] = cardinal_plural_afrikaans;
721 r[iso_639{
"bez"}.intrinsic()] = cardinal_plural_afrikaans;
722 r[iso_639{
"brx"}.intrinsic()] = cardinal_plural_afrikaans;
723 r[iso_639{
"bg"}.intrinsic()] = cardinal_plural_afrikaans;
724 r[iso_639{
"ca"}.intrinsic()] = cardinal_plural_afrikaans;
725 r[iso_639{
"ckb"}.intrinsic()] = cardinal_plural_afrikaans;
726 r[iso_639{
"ce"}.intrinsic()] = cardinal_plural_afrikaans;
728 r[iso_639{
"chr"}.intrinsic()] = cardinal_plural_afrikaans;
729 r[iso_639{
"cgg"}.intrinsic()] = cardinal_plural_afrikaans;
730 r[iso_639{
"da"}.intrinsic()] = cardinal_plural_afrikaans;
731 r[iso_639{
"dv"}.intrinsic()] = cardinal_plural_afrikaans;
732 r[iso_639{
"nl"}.intrinsic()] = cardinal_plural_afrikaans;
733 r[iso_639{
"en"}.intrinsic()] = cardinal_plural_afrikaans;
734 r[iso_639{
"eo"}.intrinsic()] = cardinal_plural_afrikaans;
735 r[iso_639{
"et"}.intrinsic()] = cardinal_plural_afrikaans;
738 r[iso_639{
"ee"}.intrinsic()] = cardinal_plural_afrikaans;
739 r[iso_639{
"fo"}.intrinsic()] = cardinal_plural_afrikaans;
740 r[iso_639{
"fi"}.intrinsic()] = cardinal_plural_afrikaans;
741 r[iso_639{
"fur"}.intrinsic()] = cardinal_plural_afrikaans;
742 r[iso_639{
"gl"}.intrinsic()] = cardinal_plural_afrikaans;
743 r[iso_639{
"lg"}.intrinsic()] = cardinal_plural_afrikaans;
745 r[iso_639{
"ka"}.intrinsic()] = cardinal_plural_afrikaans;
746 r[iso_639{
"de"}.intrinsic()] = cardinal_plural_afrikaans;
747 r[iso_639{
"el"}.intrinsic()] = cardinal_plural_afrikaans;
748 r[iso_639{
"ha"}.intrinsic()] = cardinal_plural_afrikaans;
749 r[iso_639{
"haw"}.intrinsic()] = cardinal_plural_afrikaans;
750 r[iso_639{
"hu"}.intrinsic()] = cardinal_plural_afrikaans;
751 r[iso_639{
"io"}.intrinsic()] = cardinal_plural_afrikaans;
752 r[iso_639{
"ia"}.intrinsic()] = cardinal_plural_afrikaans;
754 r[iso_639{
"it"}.intrinsic()] = cardinal_plural_afrikaans;
755 r[iso_639{
"kaj"}.intrinsic()] = cardinal_plural_afrikaans;
756 r[iso_639{
"kkj"}.intrinsic()] = cardinal_plural_afrikaans;
757 r[iso_639{
"kl"}.intrinsic()] = cardinal_plural_afrikaans;
758 r[iso_639{
"ks"}.intrinsic()] = cardinal_plural_afrikaans;
759 r[iso_639{
"kk"}.intrinsic()] = cardinal_plural_afrikaans;
760 r[iso_639{
"ku"}.intrinsic()] = cardinal_plural_afrikaans;
761 r[iso_639{
"ky"}.intrinsic()] = cardinal_plural_afrikaans;
763 r[iso_639{
"lb"}.intrinsic()] = cardinal_plural_afrikaans;
764 r[iso_639{
"jmc"}.intrinsic()] = cardinal_plural_afrikaans;
765 r[iso_639{
"ml"}.intrinsic()] = cardinal_plural_afrikaans;
766 r[iso_639{
"mr"}.intrinsic()] = cardinal_plural_afrikaans;
767 r[iso_639{
"mas"}.intrinsic()] = cardinal_plural_afrikaans;
768 r[iso_639{
"mgo"}.intrinsic()] = cardinal_plural_afrikaans;
769 r[iso_639{
"mn"}.intrinsic()] = cardinal_plural_afrikaans;
771 r[iso_639{
"nah"}.intrinsic()] = cardinal_plural_afrikaans;
772 r[iso_639{
"ne"}.intrinsic()] = cardinal_plural_afrikaans;
773 r[iso_639{
"nnh"}.intrinsic()] = cardinal_plural_afrikaans;
774 r[iso_639{
"jgo"}.intrinsic()] = cardinal_plural_afrikaans;
775 r[iso_639{
"ns"}.intrinsic()] = cardinal_plural_afrikaans;
776 r[iso_639{
"no"}.intrinsic()] = cardinal_plural_afrikaans;
778 r[iso_639{
"nb"}.intrinsic()] = cardinal_plural_afrikaans;
779 r[iso_639{
"nn"}.intrinsic()] = cardinal_plural_afrikaans;
780 r[iso_639{
"ny"}.intrinsic()] = cardinal_plural_afrikaans;
781 r[iso_639{
"nyn"}.intrinsic()] = cardinal_plural_afrikaans;
782 r[iso_639{
"or"}.intrinsic()] = cardinal_plural_afrikaans;
783 r[iso_639{
"om"}.intrinsic()] = cardinal_plural_afrikaans;
785 r[iso_639{
"os"}.intrinsic()] = cardinal_plural_afrikaans;
786 r[iso_639{
"pap"}.intrinsic()] = cardinal_plural_afrikaans;
787 r[iso_639{
"ps"}.intrinsic()] = cardinal_plural_afrikaans;
788 r[iso_639{
"rm"}.intrinsic()] = cardinal_plural_afrikaans;
789 r[iso_639{
"rof"}.intrinsic()] = cardinal_plural_afrikaans;
790 r[iso_639{
"rwk"}.intrinsic()] = cardinal_plural_afrikaans;
791 r[iso_639{
"ssy"}.intrinsic()] = cardinal_plural_afrikaans;
792 r[iso_639{
"saq"}.intrinsic()] = cardinal_plural_afrikaans;
794 r[iso_639{
"sc"}.intrinsic()] = cardinal_plural_afrikaans;
795 r[iso_639{
"seh"}.intrinsic()] = cardinal_plural_afrikaans;
796 r[iso_639{
"ksb"}.intrinsic()] = cardinal_plural_afrikaans;
797 r[iso_639{
"sn"}.intrinsic()] = cardinal_plural_afrikaans;
798 r[iso_639{
"scn"}.intrinsic()] = cardinal_plural_afrikaans;
799 r[iso_639{
"sd"}.intrinsic()] = cardinal_plural_afrikaans;
800 r[iso_639{
"xog"}.intrinsic()] = cardinal_plural_afrikaans;
801 r[iso_639{
"so"}.intrinsic()] = cardinal_plural_afrikaans;
803 r[iso_639{
"nr"}.intrinsic()] = cardinal_plural_afrikaans;
804 r[iso_639{
"sdh"}.intrinsic()] = cardinal_plural_afrikaans;
805 r[iso_639{
"st"}.intrinsic()] = cardinal_plural_afrikaans;
806 r[iso_639{
"es"}.intrinsic()] = cardinal_plural_afrikaans;
807 r[iso_639{
"sw"}.intrinsic()] = cardinal_plural_afrikaans;
809 r[iso_639{
"ss"}.intrinsic()] = cardinal_plural_afrikaans;
810 r[iso_639{
"sv"}.intrinsic()] = cardinal_plural_afrikaans;
811 r[iso_639{
"gsw"}.intrinsic()] = cardinal_plural_afrikaans;
812 r[iso_639{
"syr"}.intrinsic()] = cardinal_plural_afrikaans;
813 r[iso_639{
"ta"}.intrinsic()] = cardinal_plural_afrikaans;
814 r[iso_639{
"te"}.intrinsic()] = cardinal_plural_afrikaans;
815 r[iso_639{
"teo"}.intrinsic()] = cardinal_plural_afrikaans;
816 r[iso_639{
"tig"}.intrinsic()] = cardinal_plural_afrikaans;
818 r[iso_639{
"ts"}.intrinsic()] = cardinal_plural_afrikaans;
819 r[iso_639{
"tn"}.intrinsic()] = cardinal_plural_afrikaans;
820 r[iso_639{
"tr"}.intrinsic()] = cardinal_plural_afrikaans;
821 r[iso_639{
"tk"}.intrinsic()] = cardinal_plural_afrikaans;
822 r[iso_639{
"kcg"}.intrinsic()] = cardinal_plural_afrikaans;
823 r[iso_639{
"ur"}.intrinsic()] = cardinal_plural_afrikaans;
824 r[iso_639{
"ug"}.intrinsic()] = cardinal_plural_afrikaans;
825 r[iso_639{
"uz"}.intrinsic()] = cardinal_plural_afrikaans;
826 r[iso_639{
"ve"}.intrinsic()] = cardinal_plural_afrikaans;
828 r[iso_639{
"vo"}.intrinsic()] = cardinal_plural_afrikaans;
829 r[iso_639{
"vun"}.intrinsic()] = cardinal_plural_afrikaans;
830 r[iso_639{
"wae"}.intrinsic()] = cardinal_plural_afrikaans;
831 r[iso_639{
"fy"}.intrinsic()] = cardinal_plural_afrikaans;
832 r[iso_639{
"xh"}.intrinsic()] = cardinal_plural_afrikaans;
833 r[iso_639{
"ji"}.intrinsic()] = cardinal_plural_afrikaans;
834 r[iso_639{
"yi"}.intrinsic()] = cardinal_plural_afrikaans;
837 r[iso_639{
"lv"}.intrinsic()] = cardinal_plural_latvian;
838 r[iso_639{
"prg"}.intrinsic()] = cardinal_plural_latvian;
841 r[iso_639{
"ksh"}.intrinsic()] = cardinal_plural_colognian;
842 r[iso_639{
"lag"}.intrinsic()] = cardinal_plural_colognian;
845 r[iso_639{
"smn"}.intrinsic()] = cardinal_plural_inari_sami;
846 r[iso_639{
"iu"}.intrinsic()] = cardinal_plural_inari_sami;
847 r[iso_639{
"smj"}.intrinsic()] = cardinal_plural_inari_sami;
848 r[iso_639{
"naq"}.intrinsic()] = cardinal_plural_inari_sami;
849 r[iso_639{
"se"}.intrinsic()] = cardinal_plural_inari_sami;
851 r[iso_639{
"smi"}.intrinsic()] = cardinal_plural_inari_sami;
852 r[iso_639{
"sms"}.intrinsic()] = cardinal_plural_inari_sami;
853 r[iso_639{
"sma"}.intrinsic()] = cardinal_plural_inari_sami;
856 r[iso_639{
"be"}.intrinsic()] = cardinal_plural_belarusian;
857 r[iso_639{
"ru"}.intrinsic()] = cardinal_plural_belarusian;
858 r[iso_639{
"uk"}.intrinsic()] = cardinal_plural_belarusian;
861 r[iso_639{
"pl"}.intrinsic()] = cardinal_plural_polish;
864 r[iso_639{
"lt"}.intrinsic()] = cardinal_plural_lithuanian;
867 r[iso_639{
"bs"}.intrinsic()] = cardinal_plural_bosnian;
868 r[iso_639{
"hr"}.intrinsic()] = cardinal_plural_bosnian;
869 r[iso_639{
"sr"}.intrinsic()] = cardinal_plural_bosnian;
870 r[iso_639{
"sh"}.intrinsic()] = cardinal_plural_bosnian;
873 r[iso_639{
"shi"}.intrinsic()] = cardinal_plural_tachelhit;
876 r[iso_639{
"mo"}.intrinsic()] = cardinal_plural_moldavian;
877 r[iso_639{
"ro"}.intrinsic()] = cardinal_plural_moldavian;
880 r[iso_639{
"cs"}.intrinsic()] = cardinal_plural_czech;
881 r[iso_639{
"sk"}.intrinsic()] = cardinal_plural_czech;
884 r[iso_639{
"gv"}.intrinsic()] = cardinal_plural_manx;
887 r[iso_639{
"gd"}.intrinsic()] = cardinal_plural_scottish_gaelic;
890 r[iso_639{
"br"}.intrinsic()] = cardinal_plural_breton;
893 r[iso_639{
"dsb"}.intrinsic()] = cardinal_plural_lower_sorbian;
894 r[iso_639{
"sl"}.intrinsic()] = cardinal_plural_lower_sorbian;
895 r[iso_639{
"hsb"}.intrinsic()] = cardinal_plural_lower_sorbian;
898 r[iso_639{
"he"}.intrinsic()] = cardinal_plural_hebrew;
901 r[iso_639{
"mt"}.intrinsic()] = cardinal_plural_maltese;
904 r[iso_639{
"ga"}.intrinsic()] = cardinal_plural_irish;
907 r[iso_639{
"ar"}.intrinsic()] = cardinal_plural_arabic;
908 r[iso_639{
"ars"}.intrinsic()] = cardinal_plural_arabic;
911 r[iso_639{
"cy"}.intrinsic()] = cardinal_plural_welsh;
914 r[iso_639{
"kw"}.intrinsic()] = cardinal_plural_cornish;
919constexpr auto cardinal_plural_table = cardinal_plural_table_init();
934 return cardinal_plural_afrikaans(detail::plural_operand(n));
937 auto const language_index = language.region.intrinsic();
938 hi_axiom_bounds(language_index, detail::cardinal_plural_table);
939 return detail::cardinal_plural_table[language_index](detail::plural_operand(n));
@ other
The gui_event does not have associated data.
The HikoGUI namespace.
Definition array_generic.hpp:20
plurality_value
The plurality value of a cardinal or ordinal number.
Definition unicode_plural.hpp:28
@ other
Any other number, every language will have at least this.
@ few
The number is part of few, and this means something in the current language.
@ many
The number is part of many, and this means something in the current language.
@ two
The number was two, and this means something in the current language.
@ zero
The number was zero, and this means something in the current language.
@ one
The number was one, and this means something in the current language.
plurality_mask
A mask of plurality values that this language supports.
Definition unicode_plural.hpp:56
@ other
Any other number, every language will have at least this.
@ few
The number is part of few, and this means something in the current language.
@ many
The number is part of many, and this means something in the current language.
@ two
The number was two, and this means something in the current language.
@ zero
The number was zero, and this means something in the current language.
@ one
The number was one, and this means something in the current language.
constexpr plurality cardinal_plural(language_tag language, std::integral auto n) noexcept
Get plural information of a number in a given language.
Definition unicode_plural.hpp:929
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The IETF BCP 47 language tag.
Definition language_tag_intf.hpp:30
Plurality of a number.
Definition unicode_plural.hpp:91
constexpr size_t index(size_t n) const noexcept
Get an index to select between translations.
Definition unicode_plural.hpp:108
The operand for the unicode-plural rules.
Definition unicode_plural.hpp:130
uint8_t i
Number of digits in the value.
Definition unicode_plural.hpp:145
unsigned long long f
Visible fraction digits with trailing zeros.
Definition unicode_plural.hpp:137
uint8_t c
Compact decimal exponent value.
Definition unicode_plural.hpp:157
unsigned long long t
Visible fraction digits without trailing zeros.
Definition unicode_plural.hpp:141
uint8_t w
Number of visible fraction digits without trailing zeros.
Definition unicode_plural.hpp:153
uint8_t v
Number of visible fraction digits with trailing zeros.
Definition unicode_plural.hpp:149
unsigned long long n
Absolute value.
Definition unicode_plural.hpp:133