W3cubDocs

/WordPress

__( string $text, string $domain = ‘default’ ): string

Retrieves the translation of $text.

Description

If there is no translation, or the text domain isn’t loaded, the original text is returned.

Parameters

$textstringrequired
Text to translate.
$domainstringoptional
Text domain. Unique identifier for retrieving translated strings.
Default 'default'.

Default:'default'

Return

string Translated text.

Source

function __( $text, $domain = 'default' ) {
	return translate( $text, $domain );
}

Changelog

Version Description
2.1.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/__