Warning: This function has been deprecated. Use _x() instead.

translate_with_context( string $text, string $domain = 'default' )

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

Description Description

See also See also

Top ↑

Parameters Parameters


(string) (Required) Text to translate


(string) (Optional) Domain to retrieve the translated text

Default value: 'default'

Top ↑

Return Return

(string) Translated text

Top ↑

Source Source

File: wp-includes/deprecated.php

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

Top ↑

Changelog Changelog

Version Description
3.0.0 Use _x()
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.