Typo3 sr_language_menu下拉列表无法正常工作

时间:2014-07-04 06:10:28

标签: typo3 multilingual typo3-6.2.x

我在Typo3 6.2中安装并配置了sr_language_menu(带有real_url)。

1.如果我使用链接enter image description here

,翻译工作正常

但如果我使用下拉列表,则不会发生重定向,而是包含一些像这样的查询字符串

    /?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
  1. 如何在下拉列表中隐藏非翻译语言在链接中工作正常但在下拉列表中不起作用(我在typoscript中使用ShowInactive = 0)

1 个答案:

答案 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',
)