![](/img/trans.png)
[英]TYPO3 sys_language_mode = content_fallback doesn't work on menu
[英]Typo3 9: Second Language shows content of both translations with Fallback Mode
我有一個主頁,我有兩種語言:
我的大部分頁面都有german easy
的翻譯,但有些沒有,這就是為什么我激活了 Fallback Typ Fallback Show default language if no translation exists
,起初它似乎有效,因為它顯示了默認后備語言的內容german
,但是當我打開頁面時我也german easy
翻譯成german easy
,我在頁面上看到兩種語言的內容。 這個問題只發生在我用german easy
打開頁面時,如果我用默認語言打開頁面,它只顯示該語言的內容。
我真的不知道這是什么類型的錯誤,或者是什么原因造成的。 我發布了我的設置的屏幕截圖,並在我的 config.yaml 和 setup.typoscript 的設置下方發布了,如果這可能有幫助的話。
順便說一句,如果我將回退類型設置為嚴格,則不會發生錯誤,但是沒有翻譯的頁面再次不起作用。
配置文件
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
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
}
任何人都知道導致此錯誤的原因或如何修復它?
在站點配置中,您必須使用 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'
然后只顯示翻譯的內容,並且在導航中所有未翻譯的頁面也將以后備語言顯示
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.