function locale_language_switcher_url

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

Related topics

1 string reference to 'locale_language_switcher_url'
locale_language_negotiation_info in modules/locale/locale.module
Implements hook_language_negotiation_info().

File

includes/locale.inc, line 358

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.