OptionContext.setTranslateFunc

Sets the function which is used to translate the contexts user-visible strings, for --help output. If @func is %NULL, strings are not translated.

Note that option groups have their own translation functions, this function only affects the @parameter_string (see g_option_context_new()), the summary (see g_option_context_set_summary()) and the description (see g_option_context_set_description()).

If you are using gettext(), you only need to set the translation domain, see g_option_context_set_translation_domain().

class OptionContext
void
setTranslateFunc

Parameters

func GTranslateFunc

the #GTranslateFunc, or %NULL

data void*

user data to pass to @func, or %NULL

destroyNotify GDestroyNotify

a function which gets called to free @data, or %NULL

Meta

Since

2.12