WordPress at a glance
function is not described

translate_with_context() WP 2.5.0

Deprecated in 3.0.0. It is no longer supported and can be removed in future releases. Use _x() instead.

Translates $text like translate(), but assumes that the text contains a context after its last vertical bar.

  • See: _x()

No Hooks.


String. Translated text


translate_with_context( $text, $domain );
$text(string) (required)
Text to translate
Domain to retrieve the translated text
Default: 'default'

Code of translate with context: wp-includes/deprecated.php WP 5.2.1

function translate_with_context( $text, $domain = 'default' ) {
	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
	return before_last_bar( translate( $text, $domain ) );