wp-includes/l10n.php:2008Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale.
$singularstring$textdomainstringoptional'default'$locale?stringoptionalnullboolfunction has_translation( string $singular, string $textdomain = 'default', ?string $locale = null ): bool { return WP_Translation_Controller::get_instance()->has_translation( $singular, $textdomain, $locale );}Introduced in 6.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/l10n.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.