You are here

language_switcher_extended.module in Language Switcher Extended 8

Handles language switcher links for untranslated languages on an entity.

File

language_switcher_extended.module
View source
<?php

/**
 * @file
 * Handles language switcher links for untranslated languages on an entity.
 */
use Drupal\Core\Url;

/**
 * Implements hook_language_switch_links_alter().
 */
function language_switcher_extended_language_switch_links_alter(array &$links, $type, Url $url) {
  $processor = Drupal::service('language_switcher_extended.link_processor');

  /* @var \Drupal\language_switcher_extended\LanguageSwitcherLinkProcessor $processor */
  $processor
    ->process($links);
}