mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
gkeyfile: Document need for KEEP_TRANSLATIONS with get_locale_string()
When using g_key_file_get_locale_string() or get_locale_string_list(), the GKeyFile must have been loaded with G_KEY_FILE_KEEP_TRANSLATIONS if the lookup locale differs from the one which was current when the key file was loaded. Document that. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=792324
This commit is contained in:
parent
7c8906dcda
commit
8f7cc8cb75
@ -2183,6 +2183,10 @@ g_key_file_set_locale_string (GKeyFile *key_file,
|
||||
* translated in the given @locale if available. 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 #GKeyFile, it must be loaded with
|
||||
* %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales.
|
||||
*
|
||||
* If @key cannot be found then %NULL is returned and @error is set
|
||||
* to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated
|
||||
* with @key cannot be interpreted or no suitable translation can
|
||||
@ -2271,6 +2275,10 @@ g_key_file_get_locale_string (GKeyFile *key_file,
|
||||
* translated in the given @locale if available. 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 #GKeyFile, it must be loaded with
|
||||
* %G_KEY_FILE_KEEP_TRANSLATIONS in order to load strings for all locales.
|
||||
*
|
||||
* If @key cannot be found then %NULL is returned and @error is set
|
||||
* to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated
|
||||
* with @key cannot be interpreted or no suitable translations
|
||||
|
Loading…
x
Reference in New Issue
Block a user