get_locale_string_list


Description:

[ CCode ( array_length_type = "gsize" ) ]
public string[] get_locale_string_list (string group_name, string key, string? locale = null) throws KeyFileError

Returns the values associated with key under group_name translated in the given locale if available.

If locale is `C` then the untranslated value is returned (since GLib 2.84).

If locale is `NULL` then the current locale is assumed.

If locale is to be non-`NULL`, or if the current locale will change over the lifetime of the [struct@GLib.KeyFile], it must be loaded with [flags@GLib.KeyFileFlags.KEEP_TRANSLATIONS] in order to load strings for all locales.

If key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is returned. If the values associated with key cannot be interpreted or no suitable translations can be found then the untranslated values are returned. The returned array is `NULL`-terminated, so return.length may optionally be `NULL`.

Parameters:

this

a key file

group_name

a group name

key

a key

locale

a locale identifier or `NULL` to use the current locale

length

return location for the number of returned strings or `NULL` to ignore

Returns:

a newly allocated `NULL`-terminated string array or `NULL` if the key isn’t found. The string array should be freed with [ func@GLib.strfreev].