[英]Typo3 9: Second Language shows content of both translations with Fallback Mode
I've got a Homepage where I have two languages:我有一个主页,我有两种语言:
Most of my pages have a translation for german easy
, but some don't, which is why I activated the Fallback Typ Fallback Show default language if no translation exists
, at first it seemed to work, since it showed content from the default fallback language german
, but when I opened up pages where I have a translation to german easy
as well, I see content from both languages on the page.我的大部分页面都有
german easy
的翻译,但有些没有,这就是为什么我激活了 Fallback Typ Fallback Show default language if no translation exists
,起初它似乎有效,因为它显示了默认后备语言的内容german
,但是当我打开页面时我也german easy
翻译成german easy
,我在页面上看到两种语言的内容。 This problem only occurs when I open the page with german easy
if I open the page with the default language, it only shows the content of that language.这个问题只发生在我用
german easy
打开页面时,如果我用默认语言打开页面,它只显示该语言的内容。
I really don't know what kind of bug that is, or what its causing.我真的不知道这是什么类型的错误,或者是什么原因造成的。 I posted a screenshot of my settings and further below the settings of my config.yaml and the setup.typoscript, if that might help anyhow.
我发布了我的设置的屏幕截图,并在我的 config.yaml 和 setup.typoscript 的设置下方发布了,如果这可能有帮助的话。
Btw, if I turn the fallback type to strict the bug doesn't occur, but then again pages with no translation don't work.顺便说一句,如果我将回退类型设置为严格,则不会发生错误,但是没有翻译的页面再次不起作用。
Default Language:默认语言:
Second Language:
第二语言:
config.yaml配置文件
base: /
baseVariants: { }
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=20'
languages:
-
title: Deutsch
enabled: true
base: /
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: Deutsch
hreflang: de-DE
direction: ''
flag: de
languageId: '0'
-
title: Deutsch_vereinfacht
enabled: true
base: /de/
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: Deutsch_vereinfacht
hreflang: de-DE
direction: ''
fallbackType: fallback
fallbacks: '0'
flag: de
languageId: '2'
rootPageId: 18
routes: { }
setup.typoscript setup.typoscript
config {
absRefPrefix = auto
cache_period = 86400
debug = 0
disablePrefixComment = 1
doctype = html5
extTarget = _blank
index_enable = 1
index_externals = 1
index_metatags = 1
inlineStyle2TempFile = 1
intTarget =
linkVars = L
metaCharset = utf-8
no_cache = 0
pageTitleFirst = 1
prefixLocalAnchors = all
removeDefaultJS = 0
renderCharset = utf-8
sendCacheHeaders = 1
uniqueLinkVars = 1
// Disable image upscaling
noScaleUp = 1
// Compression and concatenation of CSS and JS Files
compressCss = 0
compressJs = 0
concatenateCss = 0
concatenateJs = 0
}
Anyone has an idea what causes this bug or how to fix it?任何人都知道导致此错误的原因或如何修复它?
In the site-config you've to use the fallbackType: free and set your fallback language, in this case german (ID = 0 ), as fallback.在站点配置中,您必须使用 fallbackType: free 并将您的后备语言(在本例中为德语(ID = 0 ))设置为后备语言。
-
title: Deutsch_vereinfacht
enabled: true
base: /de/
typo3Language: de
locale: de_DE
iso-639-1: de
navigationTitle: Deutsch_vereinfacht
hreflang: de-DE
direction: ''
fallbackType: free
fallbacks: '0'
flag: de
languageId: '2'
Then only the translated content is shown and in the navigation all not translated pages will be shown as well in the fallback-language然后只显示翻译的内容,并且在导航中所有未翻译的页面也将以后备语言显示
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.