function TranslatableInterface::hasTranslation

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/TranslatableInterface.php \Drupal\Core\TypedData\TranslatableInterface::hasTranslation()
  2. 10 core/lib/Drupal/Core/TypedData/TranslatableInterface.php \Drupal\Core\TypedData\TranslatableInterface::hasTranslation()
  3. 11.x 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.

File

core/lib/Drupal/Core/TypedData/TranslatableInterface.php, line 97

Class

TranslatableInterface
Interface for translatable data.

Namespace

Drupal\Core\TypedData

Code

public function hasTranslation($langcode);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.