Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TranslationLanguageRenderer.php

function TranslationLanguageRenderer::getLangcode

Overrides EntityTranslationRendererBase::getLangcode

File

core/modules/views/src/Entity/Render/TranslationLanguageRenderer.php, line 108

Class

TranslationLanguageRenderer
Renders entity translations in their row language.

Namespace

Drupal\views\Entity\Render

Code

public function getLangcode(ResultRow $row) {
    return $row->{$this->langcodeAlias} ?? $this->languageManager
        ->getDefaultLanguage()
        ->getId();
}
RSS feed
Powered by Drupal