public function TranslatableInterface::hasTranslation in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/TranslatableInterface.php \Drupal\Core\TypedData\TranslatableInterface::hasTranslation()
Checks there is a translation for the given language code.
Parameters
string $langcode: The language code identifying the translation.
Return value
bool TRUE if the translation exists, FALSE otherwise.
1 method overrides TranslatableInterface::hasTranslation()
- ContentEntityBase::hasTranslation in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - Checks there is a translation for the given language code.
File
- core/
lib/ Drupal/ Core/ TypedData/ TranslatableInterface.php, line 97
Class
- TranslatableInterface
- Interface for translatable data.
Namespace
Drupal\Core\TypedDataCode
public function hasTranslation($langcode);