You are here

function language_preprocess_block in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/language/language.module \language_preprocess_block()

Implements hook_preprocess_HOOK() for block templates.

File

core/modules/language/language.module, line 328
Add language handling functionality to Drupal.

Code

function language_preprocess_block(&$variables) {
  if ($variables['configuration']['provider'] == 'language') {
    $variables['attributes']['role'] = 'navigation';
  }
}