Skip to main content

language_names

Function language_names 

Source
pub fn language_names() -> &'static [GStringPtr]
Expand description

Computes a list of applicable locale names.

This can be used to construct locale-dependent filenames or search paths, for example. The returned list is sorted from most desirable to least desirable.

On POSIX systems, the return values are in POSIX locale format. See setlocale(3) for information about locales and their format.

The default locale (C on POSIX systems) is guaranteed to be returned in the output.

For example, if LANGUAGE=de:en_US, then the returned list is de, en_US, en, C.

This function consults the environment variables LANGUAGE, LC_ALL, LC_MESSAGES and LANG to find the list of locales specified by the user.

§Returns

a non-empty array of language names