From 1b3a37df74e7e5eeab8c388d1c6510ed14137c00 Mon Sep 17 00:00:00 2001 From: Arnas Udovicius Date: Tue, 8 Jun 2021 19:27:14 +0300 Subject: [PATCH] add main formule --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index edf18a9..f9b51e3 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,16 @@ Written by Arns Udovič in 2021 Refs: https://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms +## Main + +``` + nplurals=4; + plural=(n % 10 == 1 && n % 100 != 11) ? 0 + : ((n % 10 == 2 && n % 100 != 12) ? 1 + : ((n % 10 >= 3 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) ? 2 + : 3)); +``` + ## Logics 0 - singular or ending in 1 with exception for 11. Ex., 1 laps