TYPO3: indexed_search and language

让人想犯罪 __ 提交于 2019-12-04 14:41:18

Which type of problem do you have?:

  1. Is the wording of the text that comes with the search plugin (field label, explanation text) in the wrong language
  2. or are you getting results from content in languages that do not match the current language?

To solve 1.:
Ctrl-select all needed languages in "Extension Manager" -> "Translation handling". Then click "Update from repository" and wait until all language files for all extensions have been downloaded.

To solve 2.:
Add a language dependent setting for plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang to your TS-Setup.

Your setup has multiple flaws by the way, so I give you a complete example for TS-Setup here:

# German language
config.sys_language_uid = 0
config.language = de
config.htmlTag_langKey = de-DE
# the following can differ depending on server OS, e.g. "de_DE.UTF8" on Linux or "german" on Windows:
config.locale_all = de_DE
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0

# English language
[globalVar = GP:L=1]
  config.sys_language_uid = 1
  config.language = en
  config.htmlTag_langKey = en-US
  config.locale_all = en_US
  plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
[global]

# Italian language
[globalVar = GP:L=2]
  config.sys_language_uid = 2
  config.language = it
  config.htmlTag_langKey = it-IT
  config.locale_all = it_IT
  plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 2
[global]

On TYPO3 7.6 i have to set plugin.tx_indexedsearch.settings.defaultOptions.languageUid = to get results from a specific language

In Typo3 8.7.9 I had to use

plugin.tx_indexedsearch_pi2.settings.defaultOptions.languageUid < config.sys_language_uid

Note the "_pi2" !!!

For TYPO3 V9 LTS, in TYPOSCRIPT Setup :

# Default Language
plugin.tx_indexedsearch.settings.defaultOptions.languageUid = 0

# English US
[siteLanguage("locale") == "en_US.UTF-8"]
    plugin.tx_indexedsearch.settings.defaultOptions.languageUid = 0

# French
[siteLanguage("locale") == "fr_FR.UTF-8"]
    plugin.tx_indexedsearch.settings.defaultOptions.languageUid = 1

[END]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!