You are here

public function TranslatableInterface::hasTranslation in Drupal 8

Same name and namespace 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()

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\TypedData

Code

public function hasTranslation($langcode);