6 releases (1 stable)

1.0.0 Aug 15, 2018
0.9.1 Aug 7, 2018
0.8.2 Jul 31, 2018

#4 in Localization (L10n)

Download history 135/week @ 2018-08-04 91/week @ 2018-08-11 104/week @ 2018-08-18

109 downloads per month
Used in 4 crates (1 directly)

Apache-2.0/MIT

155KB
3.5K 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 33 into Rust 1.27 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

~67KB