Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d7fc007c authored by drishu's avatar drishu
Browse files

OEL-1167: Remove redundant variables.

parent 7e6ce8a3
No related branches found
No related tags found
2 merge requests!102Merge 1.x into EPIC-OEL-1255-migrate-paragraphs.,!94OEL-1167: Theme the content language switcher
......@@ -14,9 +14,7 @@ function oe_whitelabel_multilingual_preprocess_links__oe_multilingual_content_la
// Generate the label for the unavailable language.
/** @var \Drupal\Core\Language\LanguageInterface[] $languages */
$languages = \Drupal::service('language_manager')->getNativeLanguages();
$currentLanguage = \Drupal::languageManager()->getCurrentLanguage();
$current_language_id = $currentLanguage->getId();
$variables['unavailable_language'] = $languages[$current_language_id]->getName();
$variables['unavailable_language'] = $languages[$variables['current_language_id']]->getName();
// Normalize the links to an array of optional languages suitable for the BCL.
$variables['languages'] = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment