Crate gettext_rs [] [src]

gettext C library FFI binding for Rust

Usage:

 use gettext_rs::*;
 setlocale(LocaleCategory::LC_ALL, "en_US.UTF-8");
 bindtextdomain("hellorust", "/usr/local/share/locale");
 textdomain("hellorust");
 println!("Translated: {}", gettext("Hello, world!"));

Enums

LocaleCategory

Locale category enum ported from locale.h

Functions

bindtextdomain

Bind text domain to some directory containing gettext MO files

gettext

Translate msgid to localized message

setlocale

Set current locale for translations

textdomain

Switch to specific text domain