1 admin_bar.inc | admin_bar_links_locale() |
Build Locale links.
See also
File
- core/
modules/ admin_bar/ admin_bar.inc, line 755 - Menu builder functions for Administration bar.
Code
function admin_bar_links_locale() {
global $language;
$links['locale'] = array(
'#title' => isset($language->native) ? $language->native : $language->name,
'#attributes' => array('class' => array('admin-bar-locale-links')),
'#options' => array(
'icon' => 'translate-fill',
),
) + admin_bar_locale_links();
// Don't display an empty menu.
$locale_links = element_children($links['locale']);
if (empty($locale_links)) {
return array();
}
return $links;
}