I am trying to change the links of the Language Switcher module. I am using the following code, but it doesn’t work.
function mytheme_links__language_block(&$variables) { // Change variables return $variables; }
When it gets executed, I get the following error:
Notice: Array to string conversion in DrupalCoreRenderMarkup::create() (line 38 of core/lib/Drupal/Component/Render/MarkupTrait.php).
What is wrong? How could I return altered variables?