Skip to main content

language_names_with_category

Function language_names_with_category 

Source
pub fn language_names_with_category(category_name: &str) -> Vec<GString>
Available on crate feature v2_58 only.
Expand description

Computes a list of applicable locale names with a locale category name.

This can be used to construct fallback 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, and about the valid @category_name values.

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

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

language_names() is a shortcut for calling this function with a @category_name of LC_MESSAGES.

§category_name

a locale category name

§Returns

an array of language names, owned by the thread g_get_language_names_with_category() was called from; it must not be modified or freed, and must be copied to be used in another thread