3 unstable releases

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

#130 in Internationalization (i18n)

Download history 254/week @ 2024-12-18 4/week @ 2024-12-25 27/week @ 2025-01-08 57/week @ 2025-01-15 98/week @ 2025-01-22 136/week @ 2025-01-29 43/week @ 2025-02-05 32/week @ 2025-02-12 14/week @ 2025-02-19 9/week @ 2025-02-26

114 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