gettextrs

Function setlocale

source
pub fn setlocale<T: Into<Vec<u8>>>(
    category: LocaleCategory,
    locale: T,
) -> Option<Vec<u8>>
Expand description

Set current locale.

Returns an opaque string that describes the locale set. You can pass that string into setlocale() later to set the same local again. None means the call failed (the underlying API doesn’t provide any details).

For more information, see setlocale(3).

§Panics

Panics if locale contains an internal 0 byte, as such values can’t be passed to the underlying C API.