Summery Summery

Retrieve translated string with gettext context.

Syntax Syntax

_x( string $text, string $context, string $domain = 'default' )

Description Description

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.

Parameters Parameters


(Required) Text to translate.


(Required) Context information for the translators.


(Optional) Text domain. Unique identifier for retrieving translated strings. Default 'default'.

Default value: 'default'

Return Return

(string) Translated context string without pipe.

Source Source

File: wp-includes/l10n.php

 * Display translated text that has been escaped for safe use in HTML output.


Changelog Changelog

Version Description
2.8.0 Introduced.


Leave a Reply