function l10n_client_ui_toolbar in Localization client 8
Implements hook_toolbar().
File
- l10n_client_ui/
l10n_client_ui.module, line 28 - On-page tool for easier interface translation.
Code
function l10n_client_ui_toolbar() {
if (!l10n_client_ui_access_tools()) {
return;
}
$tab['l10n_client_ui'] = array(
'#type' => 'toolbar_item',
'tab' => array(
'#type' => 'html_tag',
'#tag' => 'button',
'#value' => t('Translate page'),
'#attributes' => array(
'class' => array(
'toolbar-icon',
'toolbar-icon-l10n_client_ui',
),
'role' => 'button',
'aria-pressed' => 'false',
),
),
'#wrapper_attributes' => array(
'class' => array(
'l10n_client_ui-toolbar-tab',
),
'id' => 'toolbar-tab-l10n_client_ui',
),
'#attached' => array(
'library' => array(
'l10n_client_ui/l10n_client_ui',
),
),
);
return $tab;
}