locale_language_switcher_url

7 locale.inc locale_language_switcher_url($type, $path)

Return the URL language switcher block. Translation links may be provided by other modules.

Related topics

1 string reference to 'locale_language_switcher_url'

File

includes/locale.inc, line 352
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;
}
Login or register to post comments