“languageField”仅适用于tt_content或pages表吗?
我想在自己的扩展表上使用CONTENT对象:
renderObj = CONTENT
renderObj {
table = tx_myext_domain_model_table
select {
pidInList = 28
languageField = sys_language_uid
}
renderObj = COA
renderObj {
10 = TEXT
10.field = description_short
}
}
但翻译不起作用。我从tt_content中获取了TCA-和SQL设置。还定义了SQL密钥:
PRIMARY KEY (uid),
KEY t3ver_oid (t3ver_oid,t3ver_wsid),
KEY parent (pid,sorting),
KEY language (l18n_parent,sys_language_uid)
这可能是像http://forge.typo3.org/issues/22406所述的错误吗?
编辑
在文件typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
第7578行(TYPO3 6.1.7)中,您会找到以下这些行:
if ($GLOBALS['TSFE']->sys_language_contentOL && $GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
// Sys language content is set to zero/-1 - and it is expected that whatever routine processes the output will
// OVERLAY the records with localized versions!
$sys_language_content = '0,-1';
} else {
$sys_language_content = intval($GLOBALS['TSFE']->sys_language_content);
}
$query .= ' AND ' . $conf['languageField'] . ' IN (' . $sys_language_content . ')';
$GLOBALS['TSFE']->sys_language_contentOL
将为1
。所以没有翻译。
这是配置:
config {
sys_language_uid = 1
sys_language_mode = content_fallback; 0
sys_language_overlay = 1
}
使用此配置我希望翻译...
答案 0 :(得分:1)
我觉得自己像个新手。页面翻译层/记录丢失!!!