gettext-rs 0.3.0

GNU Gettext FFI binding for Rust
Documentation

gettext-rs

GNU Gettext FFI binding for Rust

https://travis-ci.org/Koka/gettext-rs https://crates.io/crates/gettext-rs

Docs are available here

Usage:

 use gettextrs::*;
 setlocale(LocaleCategory::LcAll, "en_US.UTF-8");
 bindtextdomain("hellorust", "/usr/local/share/locale");
 textdomain("hellorust");
 println!("Translated: {}", gettext("Hello, world!"));
 println!("Singular: {}", ngettext("One thing", "Multiple things", 1));
 println!("Plural: {}", ngettext("One thing", "Multiple things", 2));