* "one: n is 1; few: n in 2..4"
* "zero: n is 0; one: n is 1; zero: n mod 100 in 1..19"
* "one: n is 1; few: n mod 10 in 2..4 and n mod 100 not in 12..14"
* Syntax:
* \code * rules = rule (';' rule)* * rule = keyword ':' condition * keyword = * condition = and_condition ('or' and_condition)* * and_condition = relation ('and' relation)* * relation = is_relation | in_relation | within_relation | 'n' * is_relation = expr 'is' ('not')? value * in_relation = expr ('not')? 'in' range_list * within_relation = expr ('not')? 'within' range * expr = ('n' | 'i' | 'f' | 'v' | 'j') ('mod' value)? * range_list = (range | value) (',' range_list)* * value = digit+ ('.' digit+)? * digit = 0|1|2|3|4|5|6|7|8|9 * range = value'..'value * \endcode *
*
* The i, f, and v values are defined as follows: *
* Examples are in the following table: *
* The difference between 'in' and 'within' is that 'in' only includes integers in the specified range, while 'within' * includes all values. Using 'within' with a range_list consisting entirely of values is the same as using 'in' (it's * not an error). *
* The difference between 'in' and 'within' is that 'in' only includes * integers in the specified range, while 'within' includes all values. * Using 'within' with a range_list consisting entirely of values is the * same as using 'in' (it's not an error). *
* Keywords * could be defined by users or from ICU locale data. There are 6 * predefined values in ICU - 'zero', 'one', 'two', 'few', 'many' and * 'other'. Callers need to check the value of keyword returned by * {@link #select} method. *
* UnicodeString keyword = pl->select(number); * if (keyword== UnicodeString("one") { * ... * } * else if ( ... ) *
* ICU defines plural rules for many locales based on CLDR Language Plural Rules. * For these predefined rules, see CLDR page at * http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html *
PluralRules