/**
* Provides default language code of given entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity whose language code to be loaded.
*
* @return string
* A string language code.
*/ publicfunctiongetDefaultLangcode(EntityInterface $entity){ returnlanguage_get_default_langcode($entity->getEntityTypeId(), $entity->bundle()); }