3 unstable releases

new 0.2.0 Jan 28, 2025
0.1.1 Dec 18, 2024
0.1.0 Dec 18, 2024

#134 in Internationalization (i18n)

Download history 253/week @ 2024-12-16 5/week @ 2024-12-23 19/week @ 2025-01-06 59/week @ 2025-01-13 24/week @ 2025-01-20

102 downloads per month
Used in yoda

MIT license

4KB

plurify

Build Documentation crates.io

Pluralize words in different locales

Install

cargo add plurify

Usage

use plurify::*;

let en = &["cat", "cats", "cats"];
let uk = &["кіт", "кота", "котів"];

assert_eq!(1.plurify(en), "cat");
assert_eq!(2.plurify(en), "cats");
assert_eq!(5.plurify(en), "cats");

assert_eq!(1.plurify(uk), "кіт");
assert_eq!(2.plurify(uk), "кота");
assert_eq!(5.plurify(uk), "котів");

No runtime deps