WordPress at a glance
function is not described

translate_with_context() WP 2.5.0

Deprecated from version 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.

No Hooks.

Return

String. Translated text.

Usage

translate_with_context( $text, $domain );
$text(string) (required)
Text to translate.
$domain(string)
Domain to retrieve the translated text.

Notes

  • See: _x()

Changelog

Since 2.5.0 Introduced.
Deprecated Since 3.0.0 Use _x()

Code of translate_with_context() WP 5.7

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