Drupal Array to string conversion hook 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(&amp;$variables) {
  // Change variables
  return $variables;
}


When it gets executed, I get the following error:


  Notice: Array to string conversion in Drupal\Core\Render\Markup::create() (line 38 of core/lib/Drupal/Component/Render/MarkupTrait.php).


What is wrong? How could I return altered variables?
The problem is solved by just using another hook

function mytheme_preprocess_links__language_block(&amp;$variables)
{
    $variables['links']['en']['link']['#title'] = "ENG";
}


Thanks