### Function

# GLib TranslateFunc

since: 2.0

#### Declaration

    const gchar*
    (* GTranslateFunc) (
      const gchar* str,
      gpointer data
    )

#### Description

The type of functions which are used to translate user-visible strings, for —help output.

Available since: 2.0

#### Parameters

`str`

  Type: `const gchar*`

  The untranslated string.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`data`

  Type: `gpointer`

  User data specified when installing the function, e.g. in `g_option_group_set_translate_func()`

  The argument can be `NULL`.
  The data is owned by the caller of the function.

#### Return value

Type: `const gchar*`

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

The data is owned by the called function.
The value is a NUL terminated UTF-8 string.