I notice that tabs are not translate - i need to add in function theme_qt_quicktabs_tabset($vars) additional line $tab['#title'] = t($tab['#title']); that the tabs translate - please check it.

Comments

iztok’s picture

function theme_preprocess_qt_quicktabs_tabset(&$vars) {
  foreach($vars['tabset']['tablinks'] as $id => $tablink) {
    $vars['tabset']['tablinks'][$id]['#title'] = t($tablink['#title']);
  }
}
fuerst’s picture

Issue summary: View changes

Alternatively you may use hook_quicktabs_alter() which allows translating the container title too:

/**
 * Implementation of hook_quicktabs_alter().
 */
function mymodule_quicktabs_alter(&$quicktabs) {
  // Make Quicktab container title as well as tab title translatable.
  $quicktabs->title = t($quicktabs->title);
  foreach ($quicktabs->tabs as $key => $tab) {
    $quicktabs->tabs[$key]['title'] = t($quicktabs->tabs[$key]['title']);
  }
}
kopeboy’s picture

I am about to try this module, you confirm we can't translate Quicktabs labels with i18n ?

rcodina’s picture

#1 Works for me. Thanks! It would be great this could be translated directly with i18n without the need of #1.

isramv’s picture

#2 worked for me thanks.

smustgrave’s picture

Status: Active » Closed (outdated)

With D7 EOL approaching in a month I'm starting to triage the D7 side of quicktabs queue.

If still an issue or needed for 4.0.x (latest branch) feel free to reopen