diff --git a/core/modules/views/src/Plugin/views/field/Field.php b/core/modules/views/src/Plugin/views/field/Field.php index c9bc2f2..73e03a4 100644 --- a/core/modules/views/src/Plugin/views/field/Field.php +++ b/core/modules/views/src/Plugin/views/field/Field.php @@ -723,8 +723,6 @@ public function getItems(ResultRow $values) { 'settings' => $this->options['settings'], 'label' => 'hidden', ); - // @todo (in this patch) make this able to render the langcode field itself - // for this translation. $render_array = $entity->get($this->definition['field_name'])->view($display); $items = array(); @@ -907,12 +905,7 @@ protected function addSelfTokens(&$tokens, $item) { * The field language code. */ protected function getFieldLangcode(EntityInterface $entity, ResultRow $row) { - // Retrieve the translation language code for this field. Even though - // the language field is not translatable (it is what is used to key - // translations), apply the language code lookup for that too, because that - // allows us to display the language name itself in the right language. - $langcode_key = $entity->getEntityType()->getKey('langcode'); - if ($this->getFieldDefinition()->isTranslatable() || $this->getFieldDefinition()->getName() == $langcode_key) { + if ($this->getFieldDefinition()->isTranslatable()) { // Even if the current field is not attached to the main entity, we use it // to determine the field language, as we assume the same language should // be used for all values belonging to a single row, when possible. Below