function locale_language_switcher_url
locale_language_switcher_url($type, $path)
Return the URL language switcher block. Translation links may be provided by other modules.
Related topics
File
- includes/locale.inc, line 358
- Administration functions for locale.module.
Code
function locale_language_switcher_url($type, $path) { $languages = language_list('enabled'); $links = array(); foreach ($languages[1] as $language) { $links[$language->language] = array( 'href' => $path, 'title' => $language->native, 'language' => $language, 'attributes' => array('class' => array('language-link')), ); } return $links; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_language_switcher_url/7.x