Glib.Option.Set_Translate_Func_User_Data

Entities

Generic formal parameters

Access Types

Subprograms

Description

Destroy

procedure Destroy (Data : in out User_Data_Type)
Parameters
Data

Gtranslate_Func

type Gtranslate_Func is access function
  (Str  : UTF8_String;
   Data : User_Data_Type) return UTF8_String;

The type of functions which are used to translate user-visible strings, for <option>--help</option> output.

Parameters
Str

the untranslated string

Data

user data specified when installing the function, e.g. in g_option_group_set_translate_func

Return Value

a translation of the string for the current locale. The returned string is owned by GLib and must not be freed.

Set_Translate_Func

procedure Set_Translate_Func
   (Self           : Glib.Option.Goption_Context;
    Func           : Gtranslate_Func;
    Data           : User_Data_Type;
    Destroy_Notify : Glib.G_Destroy_Notify_Address)

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 Glib.Option.G_New), the summary (see Glib.Option.Set_Summary) and the description (see Glib.Option.Set_Description). If you are using gettext, you only need to set the translation domain, see Glib.Option.Set_Translation_Domain. Since: gtk+ 2.12

Parameters
Self
Func

the Gtranslate_Func, or null

Data

user data to pass to Func, or null

Destroy_Notify

a function which gets called to free Data, or null

User_Data_Type

type User_Data_Type (<>) is private;