Internationalization.dgettext

This function is a wrapper of dgettext() which does not translate the message if the default domain as set with textdomain() has no translations for the current locale. The advantage of using this function over dgettext() proper is that libraries using this function (like GTK+) will not use translations if the application using the library does not have translations for the current locale. This results in a consistent English-only interface instead of one having partial translations. For this feature to work, the call to textdomain() and setlocale() should precede any g_dgettext() invocations. For GTK+, it means calling textdomain() before gtk_init or its variants. This function disables translations if and only if upon its first Since 2.18

class Internationalization
static
string
dgettext
(
string domain
,
string msgid
)

Parameters

domain string

the translation domain to use, or NULL to use the domain set with textdomain(). [allow-none]

msgid string

message to translate

Return Value

Type: string

The translated string

Meta