gettextrs

Function dcgettext

source
pub fn dcgettext<T, U>(
    domainname: T,
    msgid: U,
    category: LocaleCategory,
) -> String
where T: Into<String>, U: Into<String>,
Expand description

Translate msgid to localized message from the specified domain using custom locale category.

For more information, see dcgettext(3).

§Panics

Panics if:

  • domainname or msgid contain an internal 0 byte, as such values can’t be passed to the underlying C API;
  • the result is not in UTF-8 (see this note).