has_translation
has_translation ( $singular, $textdomain = 'default', $locale = null )
Parameters:- (string) singular Singular translation to check.
- (string) textdomain Optional. Text domain. Default 'default'.
- (?string) locale Optional. Locale. Default current locale.
Returns:- (bool) True if the translation exists, false otherwise.
Defined at: - Introduced in WordPress: 6.7.0
- Deprecated in WordPress: —
Description
Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale.