15 releases (5 major breaking)

✓ Uses Rust 2018 edition

5.0.1 Nov 21, 2019
4.0.1 Oct 15, 2019
3.0.0 Sep 10, 2019
2.0.0 Jul 26, 2019
0.8.2 Jul 31, 2018

#6 in Internationalization (i18n)

Download history 672/week @ 2019-08-08 612/week @ 2019-08-15 651/week @ 2019-08-22 701/week @ 2019-08-29 638/week @ 2019-09-05 808/week @ 2019-09-12 922/week @ 2019-09-19 782/week @ 2019-09-26 1287/week @ 2019-10-03 828/week @ 2019-10-10 1240/week @ 2019-10-17 1245/week @ 2019-10-24 1353/week @ 2019-10-31 2000/week @ 2019-11-07 3074/week @ 2019-11-14

5,234 downloads per month
Used in 16 crates (1 directly)

Apache-2.0/MIT

100KB
3K SLoC

INTL Plural Rules

intl_pluralrules categorizes numbers by plural operands. See Unicode Plural Rules

crates.io Build Status Coverage Status

This library is intended to be used to find the plural category of numeric input.

Status

Currently produces operands compliant with CLDR 36 into Rust 1.31 and above.

Updating CLDR Data

If you would like to update rules.rs with plural rules that are not the specified version above (e.g. future versions of CLDR or external CLDR-compliant rules), you can regenerate the logic in rules.rs with the command:

cargo regenerate-data

You will need to replace the JSON files under /cldr_data/ with your new CLDR JSON files.

Local Development

cargo build
cargo test

When submitting a PR please use cargo fmt.

Contributors

Thank you to all contributors!

Dependencies

~200KB