我正在使用TYPO3 9.5,并且尝试使用TYPO3的复制过程来翻译页面, 当我更改为默认语言(EN)以外的其他语言时,内容将显示两次的问题。
languages:
-
title: English
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: en_US.UTF-8
iso-639-1: en
navigationTitle: EN
hreflang: en-US
direction: ''
flag: en-us-gb
-
title: Deutsch
enabled: true
languageId: '1'
base: /de/
typo3Language: de
locale: de_DE.UTF-8
iso-639-1: de
navigationTitle: de
hreflang: de-DE
direction: ''
fallbackType: fallback
fallbacks: '0'
flag: de
在我的配置中,我尝试使用:languageField = sys_language_uid
select {
orderBy = sorting
languageField = sys_language_uid###
where = {#colPos}={register:colPos}
where.insertData = 1
pidInList.data = register:pageUid
pidInList.override.data = register:contentFromPid
}
但是将始终显示默认语言(EN),但如果使用:
includeRecordsWithoutDefaultTranslation = 1
内容将以默认语言和所选语言显示两次。
编辑:
config {
absRefPrefix = auto
no_cache = {$config.no_cache}
uniqueLinkVars = 1
noPageTitle = 2
linkVars = L
prefixLocalAnchors = {$config.prefixLocalAnchors}
renderCharset = utf-8
metaCharset = utf-8
doctype = html5
removeDefaultJS = {$config.removeDefaultJS}
inlineStyle2TempFile = 0
admPanel = {$config.admPanel}
debug = 0
cache_period = 86400
sendCacheHeaders = {$config.sendCacheHeaders}
enableContentLengthHeader = 1
intTarget = 0
disablePrefixComment = 1
index_enable = 1
index_externals = 1
index_metatags = 1
headerComment = 0
contentObjectExceptionHandler = 0
compressJs = 0
compressCss = 0
concatenateJs = 0
concatenateCss = 0
}
解决了配置yml中的双重内容的问题:
fallbackType: strict
答案 0 :(得分:0)
在尊重要读取的表的同时,将自动检测选项languageField和pidInList以匹配当前页面和语言。出于测试目的,您只能使用“ 但是,我认为您的问题位于配置中的其他位置。您还会根据“ L” -GET-Var设置config.-Typoscript-Section的某些语言设置,例如sys_language_uid吗?