wpseek.com
A WordPress-centric search engine for devs and theme authors



_x › WordPress Function

Since2.8.0
Deprecatedn/a
_x ( $text, $context, $domain = 'default' )
Parameters: (3)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $context Context information for the translators.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    Default: 'default'
Returns:
  • (string) Translated context string without pipe.
Defined at:
Codex:

Retrieves translated string with gettext context.

Quite a few times, there will be collisions with similar translatable text found in more than two places, but with different translated context. By including the context in the pot file, translators can translate the two strings differently.


Related Functions: _nx, _ex, _, __, _c

Source

function _x( $text, $context, $domain = 'default' ) {
	return translate_with_gettext_context( $text, $context, $domain );
}