gettextrs

Module getters

source
Expand description

Query gettext configuration.

There are just a few settings in gettext. The only required one is the message domain, set using textdomain; the other two are the path where translations are searched for, and the encoding to which the messages should be converted.

The underlying C API uses the same functions both as setters and as getters: to get the current value, you just pass NULL as an argument. This is ergonomic in C, but not in Rust: wrapping everything in Options is a tad ugly. That’s why this crate provides getters as separate functions. They’re in a module of their own to prevent them from clashing with any functions that the underlying C API might gain in the future.

Functions§