【问题标题】:Typo3 Solr indexing different languages/translationsTypo3 Solr 索引不同的语言/翻译
【发布时间】:2015-01-21 16:04:51
【问题描述】:

我正在使用 Typo3 和 Apache Solr。我有三种不同语言的不同页面。我为这些语言设置了三个 Solr 内核。现在我希望 Solr 将每个页面的不同翻译索引到其正确的核心(英文页面 -> core_en 等) 我在 Typoscript 中编写了以下代码:

[globalVar = GP:L = 0]
plugin.tx_solr.solr.path = /solr/core_en/
[global]
[globalVar = GP:L = 1]
plugin.tx_solr.solr.path = /solr/core_de/
[global]
[globalVar = GP:L = 2]
plugin.tx_solr.solr.path = /solr/core_zh/
[global]
plugin.tx_solr.solr.host = localhost
plugin.tx_solr.solr.port = 8080
plugin.tx_solr.solr.scheme = http

这很好用。问题是当页面没有翻译时,例如在德国。 Typo3 自动“回退”到默认语言,并在这种情况下将其索引到英语核心中。 有没有办法验证页面是否以某种语言存在,因此 Solr 不会对其进行索引?

【问题讨论】:

    标签: solr indexing typo3 translation multilingual


    【解决方案1】:

    好的,我已经知道如何做到这一点了。就我而言,它可以添加/修改以下 Typoscript 行:

    sys_language_mode = strict
    

    这意味着如果没有某种语言的翻译,它不会重定向到默认语言,但会显示“找不到页面”错误。所以在索引过程中根本没有要索引的页面。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-17
      • 2015-12-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多