Feature #9070

Translation of index configuration titles

Added by Adrian Föder almost 3 years ago. Updated about 1 month ago.

Status:New Start date:2010-07-28
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:indexed search
Target version:-
TYPO3 Version: Complexity:
PHP Version:
Votes: 0

Description

Hello,

unfortunately the possibility to translate the title of an index configuration in the plugin output is a tiny step away.

there is

    // Create header if we are searching more than one indexing configuration:
if (count($indexCfgs)>1)    {
    if ($freeIndexUid>0)    {
        list($indexCfgRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('title','index_config','uid='.intval($freeIndexUid).$this->cObj->enableFields('index_config'));
        $titleString = $indexCfgRec['title'];
    } else {
        $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
    }
    $content = '<h1 class="tx-indexedsearch-category">'.htmlspecialchars($titleString).'</h1>'.$content;
}

in short words: if an index cfg record is found, its title is used for output ($titleString), ELSE an LLL-value corresponding to the index cfg uid is used.

Due to the fact that index cfg records are (for the moment) not translateable but the LLL-Variant is a very nice, TYPO-Script configurable feature, I suggest doing

[...]
if ($freeIndexUid>0)    {
    list($indexCfgRec) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('title','index_config','uid='.intval($freeIndexUid).$this->cObj->enableFields('index_config'));
    $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
    if(!$titleString) {
        $titleString = $indexCfgRec['title'];
    }                    
} else {
    $titleString = $this->pi_getLL('opt_freeIndexUid_header_'.$freeIndexUid);
}
[...]

that means: if plugin.tx_indexedsearch._LOCAL_LANG.de.opt_freeIndex_Uid_header_3 (for example) is set, this value is used, otherwise the one being set as title of the index config record.

What do you think?

History

Updated by Oliver Hader about 1 month ago

  • Target version set to (temporary)

Updated by Oliver Hader about 1 month ago

  • Project changed from Indexed Search to Core

Updated by Oliver Hader about 1 month ago

  • Category set to indexed search

Updated by Oliver Hader about 1 month ago

  • Target version deleted ((temporary))

Also available in: Atom PDF