### Function

# GLib dcgettext

since: 2.26

#### Declaration

    const gchar*
    g_dcgettext (
      const gchar* domain,
      const gchar* msgid,
      gint category
    )

#### Description

This is a variant of `g_dgettext()` that allows specifying a locale category instead of always using `LC_MESSAGES`. See `g_dgettext()` for more information about how this functions differs from calling `dcgettext()` directly.

Available since: 2.26

#### 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.

`msgid`

  Type: `const gchar*`

  Message to translate.

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

`category`

  Type: `gint`

  A locale category.

#### Return value

Type: `const gchar*`

The translated string for the given locale category.

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