Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LanguageManagerInterface.php

function LanguageManagerInterface::getLanguageSwitchLinks

Returns the language switch links for the given language type.

Parameters

string $type: The language type.

\Drupal\Core\Url $url: The URL the switch links will be relative to.

Return value

object|null An object with the following keys:

  • links: An array of links indexed by the language ID
  • method_id: The language negotiation method ID

or NULL if there are no language switch links.

1 method overrides LanguageManagerInterface::getLanguageSwitchLinks()
LanguageManager::getLanguageSwitchLinks in core/lib/Drupal/Core/Language/LanguageManager.php
Returns the language switch links for the given language type.

File

core/lib/Drupal/Core/Language/LanguageManagerInterface.php, line 180

Class

LanguageManagerInterface
Common interface for the language manager service.

Namespace

Drupal\Core\Language

Code

public function getLanguageSwitchLinks($type, Url $url);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal