Drupal – Quicktabs Translation

If you could not find the Quick tabs tab name in the Translate Interface. you can add the following function in the template.php.

function YOURTHEMENAME_quicktabs_tabs($quicktabs, $active_tab = 'none') {
  $output = '';
  $tabs_count = count($quicktabs['tabs']);
  if ($tabs_count <= 0) {
    return $output;
  }

  $index = 1;
  $output .= '<ul class="quicktabs_tabs quicktabs-style-'. drupal_strtolower($quicktabs['style']) .'">';
  foreach ($quicktabs['tabs'] as $i => $tab) {
    $class = 'qtab-'. $i;
    // Add first, last and active classes to the list of tabs to help out themers.
    $class .= ($i == $active_tab ? ' active' : '');
    $class .= ($index == 1 ? ' first' : '');
    $class .= ($index == $tabs_count ? ' last': '');
    $attributes_li = drupal_attributes(array('class' => $class));
    $options = _quicktabs_construct_link_options($quicktabs, $i);
    $output .= '<li'. $attributes_li .'>'. l(t($tab['title']), $_GET['q'], $options) .'</li>';
    $index++;
  }
  $output .= '</ul>';
  return $output;
}

 

Refresh the strings in the Translate Interface and then you could search your Quick tabs tab name for translation.

Reference: Translation of quicktabs tab text

Advertisements

4 thoughts on “Drupal – Quicktabs Translation”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.