function language_switcher_url

Return links for the URL language switcher block.

Translation links may be provided by other modules.

2 string references to 'language_switcher_url'
language_language_negotiation_info in drupal/core/modules/language/language.module
Implements hook_language_negotiation_info().
locale_update_8007 in drupal/core/modules/locale/locale.install
Convert language_negotiation_* variables to use the new callbacks.

File

drupal/core/modules/language/language.negotiation.inc, line 377
Language negotiation functions.

Code

function language_switcher_url($type, $path) {
  $languages = language_list();
  $links = array();
  foreach ($languages as $language) {
    $links[$language->langcode] = array(
      'href' => $path,
      'title' => $language->name,
      'language' => $language,
      'attributes' => array(
        'class' => array(
          'language-link',
        ),
      ),
    );
  }
  return $links;
}