glib

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, which can be used to construct the fallback locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale “C”.

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

g_get_language_names() returns g_get_language_names_with_category(“LC_MESSAGES”).

§category_name

a locale category name

§Returns

a None-terminated array of strings owned by the thread g_get_language_names_with_category was called from. It must not be modified or freed. It must be copied if planned to be used in another thread. Computes a list of applicable locale names with a locale category name, which can be used to construct the fallback locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale “C”.

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

g_get_language_names() returns g_get_language_names_with_category(“LC_MESSAGES”).

§category_name

a locale category name

§Returns

a None-terminated array of strings owned by the thread g_get_language_names_with_category was called from. It must not be modified or freed. It must be copied if planned to be used in another thread.