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:

Description

Returns a boolean to indicate whether a translation exists for a given string with optional text domain and locale.

Related Functions

has_action, load_script_translations, translations_api, _get_path_to_translation, list_translation_updates

Top Google Results

User discussions

wpseek mobile