Same name in other branches
  1. 7.x-3.x quicktabs.classes.inc \QuickSet::translateString()

Translates Quicktabs user-defined strings if the i18n module is enabled.

1 call to QuickSet::translateString()
QuickSet::getTitle in src/QuickSet.php

File

src/QuickSet.php, line 167

Class

QuickSet
A QuickSet object is an unrendered Quicktabs instance, essentially just a container of content items, as defined by its configuration settings and the array of content items it contains.

Namespace

Drupal\quicktabs

Code

public function translateString($string, $type = 'tab', $index = 0) {
    switch ($type) {
        case 'tab':
            $name = "tab:{$this->name}-{$index}:title";
            break;
        case 'title':
            $name = "title:{$this->name}";
            break;
    }
    return quicktabs_translate($name, $string);
}