我在Typo3 6.2中安装并配置了sr_language_menu(带有real_url)。
1.如果我使用链接
,翻译工作正常但如果我使用下拉列表,则不会发生重定向,而是包含一些像这样的查询字符串
/?tx_srlanguagemenu_languagemenu[__referrer][%40extension]=SrLanguageMenu&tx_srlanguagemenu_languagemenu[__referrer][%40controller]=Menu&tx_srlanguagemenu_languagemenu[__referrer][%40action]=index&tx_srlanguagemenu_languagemenu[__referrer][arguments]=YTowOnt9d9666863629331a07b703f260fec14a2665cc267&tx_srlanguagemenu_languagemenu[__trustedProperties]=a%3A0%3A{}cb8407c7c1f13f96cdceecffd389e5c5a2e8d31c&tx_srlanguagemenu_languagemenu[uri]=de%2Fzuhause%2F
答案 0 :(得分:0)
我使用以下typoscript来编写语言
lib.language = HMENU
lib.language {
special = language
special.value = 0,1
1 = TMENU
1 {
wrap =
class="dropdown-toggle" href="#">Language
class="dropdown-menu">|
noBlur = 1
NO {
linkWrap =
|
||
|
stdWrap.override = Nederlands || English
doNotLinkIt = 1
stdWrap.typolink.parameter.data = page:uid
stdWrap.typolink.additionalParams = &L=0 || &L=1
stdWrap.typolink.addQueryString = 1
stdWrap.typolink.addQueryString.exclude = L,id,cHash,no_cache
stdWrap.typolink.addQueryString.method = GET
stdWrap.typolink.useCacheHash = 1
stdWrap.typolink.no_cache = 0
stdWrap.typolink.title = Nederlands || English
}
ACT < .NO
ACT = 1
ACT {
linkWrap =
|
||
class="en_lang active">|
}
}
}
In your custom typo3conf/realurl_conf.php you need to set the languages
according to the id they have
array(
'GETvar' => 'L',
'valueMap' => array(
// id's need to line up with Website Language Ids in TYPO3
// 'nederlands' => '0',
'' => '0',
// 'english' => '1',
'en' => '1',
),
'noMatch' => 'bypass',
)