You are here

public function FieldCollectionItemEntity::translatedInstanceLabel in Field collection 7

Returns the field instance label translated to interface language.

1 call to FieldCollectionItemEntity::translatedInstanceLabel()
FieldCollectionItemEntity::defaultLabel in ./field_collection.entity.inc
Specifies the default label, which is picked up by label() by default.

File

./field_collection.entity.inc, line 127

Class

FieldCollectionItemEntity
Class for field_collection_item entities.

Code

public function translatedInstanceLabel($langcode = NULL) {
  if ($info = $this
    ->instanceInfo()) {
    if (module_exists('i18n_field')) {
      return i18n_string("field:{$this->field_name}:{$info['bundle']}:label", $info['label'], array(
        'langcode' => $langcode,
        'sanitize' => FALSE,
      ));
    }
    return $info['label'];
  }
}