Internationalization.getLocaleVariants

Returns a list of derived variants of @locale, which can be used to e.g. construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable. This function handles territory, charset and extra locale modifiers.

For example, if @locale is "fr_BE", then the returned list is "fr_BE", "fr".

If you need the list of variants for the current locale, use g_get_language_names().

struct Internationalization
static
string[]
getLocaleVariants
(
string locale
)

Parameters

locale string

a locale identifier

Return Value

Type: string[]

a newly allocated array of newly allocated strings with the locale variants. Free with g_strfreev().

Meta

Since

2.28