### Function

# GLib dpgettext

since: 2.16

#### Declaration

    const gchar*
    g_dpgettext (
      const gchar* domain,
      const gchar* msgctxtid,
      gsize msgidoffset
    )

#### Description

This function is a variant of `g_dgettext()` which supports a disambiguating message context. GNU gettext uses the ‘\004’ character to separate the message context and message id in `msgctxtid`. If 0 is passed as `msgidoffset`, this function will fall back to trying to use the deprecated convention of using “|” as a separation character.

This uses `g_dgettext()` internally. See that functions for differences with `dgettext()` proper.

Applications should normally not use this function directly, but use the C_() macro for translations with context.

Available since: 2.16

#### Parameters

`domain`

  Type: `const gchar*`

  The translation domain to use, or `NULL` to use the domain set with `textdomain()`

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`msgctxtid`

  Type: `const gchar*`

  A combined message context and message id, separated by a \004 character.

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

`msgidoffset`

  Type: `gsize`

  The offset of the message id in `msgctxid`.

#### Return value

Type: `const gchar*`

The translated string.

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