WP_Translation_File::translate( string $text ): false|string

In this article

Translates a given string.

Parameters

$textstringrequired
String to translate.

Return

false|string Translation(s) on success, false otherwise.

Source

public function translate( string $text ) {
	if ( ! $this->parsed ) {
		$this->parse_file();
	}

	return $this->entries[ $text ] ?? false;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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