Index: typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php =================================================================== --- typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (revision 7135) +++ typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (working copy) @@ -287,7 +287,7 @@ ), 'lang' => Array ( -1 => $this->pi_getLL('opt_lang_-1'), - 0 => $this->pi_getLL('opt_lang_0'), + 0 => $this->getDefaultLanguageName() ), 'desc' => Array ( '0' => $this->pi_getLL('opt_desc_0'), @@ -2395,9 +2395,38 @@ } } } + + /** + * Obtains default language name. + * + * @return string + */ + protected function getDefaultLanguageName() { + $languageName = $this->getDefaultLanguageNameFromTSConfig(); + if ($languageName == '') { + $languageName = $this->pi_getLL('opt_lang_0'); } + return $languageName; + } + /** + * Obtains default language name from TSConfig. + * + * @return string + */ + protected function getDefaultLanguageNameFromTSConfig() { + $result = ''; + $tsConfig = $GLOBALS['TSFE']->getPagesTSconfig(); + if (is_array($tsConfig)) { + if (isset($tsConfig['mod.']['SHARED.']['defaultLanguage.']['title'])) { + $result = $tsConfig['mod.']['SHARED.']['defaultLanguage.']['title']; + } + } + return $result; + } +} + if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/pi/class.tx_indexedsearch.php']) { include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/pi/class.tx_indexedsearch.php']); }