我使用typo3 6.2.4
我需要翻译其他语言的标题现在,如果我使用“Deutsch”语言在前端,那么它就是显示的语言“Français”的标题。我的三种语言的配置:
config.linkVars = L
config.uniqueLinkVars = 2
config.sys_language_overlay = 0
config.language = fr
config.locale_all = fr_FR
config.htmlTag_langKey = fr-FR
config.sys_language_uid = 0
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
[globalVar = GP:L = 1]
config.language = de
config.sys_language_uid = 1
config.locale_all = de_DE
config.htmlTag_langKey = de-DE
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 1
[globalVar = GP:L = 2]
config.language = en
config.locale_all = en_EN
config.htmlTag_langKey = en-EN
config.sys_language_uid = 2
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 2
[end]
我的选择:
page.10 >
page.10 = CONTENT
page.10.table = pages
page.10.select {
pidInList = this
orderBy = sorting
}
page.10.renderObj = COA
page.10.renderObj {
10 = TEXT
10.field = title
10.wrap = <div class="titleFormation">|</div>
}
答案 0 :(得分:3)
temp.languageTitle >
temp.languageTitle = CONTENT
temp.languageTitle.table = pages
[globalVar = GP:L = 1] || [globalVar = GP:L = 2]
temp.languageTitle.select {
join = pages_language_overlay ON(pages.uid=pages_language_overlay.pid)
andWhere {
data = TSFE:sys_language_uid
wrap = pages_language_overlay.sys_language_uid=|
}
pidInList = this
orderBy = sorting
}
[global]
[globalVar = GP:L = 0]
temp.languageTitle.select {
pidInList = this
orderBy = sorting
}
[global]
我们需要这样做,因为在DB SQL中,其他页面中的标题不在表“pages”中,而是在“pages_language_overlay”表中。
page.10 >
page.10 < temp.languageTitle
page.10.renderObj = COA
page.10.renderObj {
10 = TEXT
10.field = title
10.wrap = <div class="titleFormation">|</div>
}
现在标题是用优秀的语言翻译的。