r18n 0.0.2

Internationalisation library for Rust
docs.rs failed to build r18n-0.0.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: r18n-0.0.1

r18n

Text t

extern crate r18n;
let toml = r#"
[tlc.FRA]
name = "Frankfurt"
"#;

let r : r18n::R18n = toml.parse().unwrap();
assert_eq!(r.t("tlc.FRA.name").unwrap(), "Frankfurt");

Count

extern crate r18n;
let toml = r#"
[pax]
guests = [
    "1 guest",
    "%d guests"
]
"#;

let r : r18n::R18n = toml.parse().unwrap();
assert_eq!(r.c("pax.guests", 1).unwrap(), "1 guest");
assert_eq!(r.c("pax.guests", 3).unwrap(), "3 guests");

Links