function 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);

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