2014-10-01 117 views
2

我用TYPO3 6.2.4標題在其他語言不翻譯

我需要翻譯在其他語言中的標題現在,如果我在前端是與語言「德語」,這是語言的標題顯示「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> 
    } 

回答

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_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> 
    } 

現在標題被翻譯成好語言。