Last active
September 11, 2023 12:54
-
-
Save skounis/d74daa86d325678a8e88c009eedd08cf to your computer and use it in GitHub Desktop.
Drupal - Preprocess language links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function startupgrowth_preprocess_links__language_block(&$variables) { | |
foreach ($variables['links'] as $i => $link) { | |
/** @var \Drupal\language\Entity\ConfigurableLanguage $linkLanguage */ | |
// $linkLanguage = $link['link']['#options']['language']; | |
// $variables['links'][$i]['link']['#title'] = $linkLanguage->get('id'); | |
$variables['links'][$i]['link']['#title']= $i; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment