[TYPO3-english] Sr_language_menu Dropdown issue

Jacco van der Post jacco at id-internetservices.com
Fri Jul 4 12:04:59 CEST 2014


Hi,

Why use an extension for this?

You can easily do it with typoscript. Here an example used in a 
Bootstrap template.


  lib.language = HMENU
  lib.language  {
     special = language
     special.value = 0,1
     1 = TMENU
     1 {
        wrap = <ul class="nav"><li class="dropdown language"><a 
class="dropdown-toggle" href="#"><i class="icon-flag 
icon-white"></i>Language<b class="caret"></b></a><ul 
class="dropdown-menu">|</ul></li></ul>
        noBlur = 1
        NO  {
           linkWrap = <li class="nl_lang">|</li>||<li class="en_lang">|</li>
     stdWrap.override = <span>Nederlands</span> || <span>English</span>
     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 = <li class="nl_lang active">|</li>||<li 
class="en_lang active">|</li>
            }
     }
  }


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

-- 
Kind Regards

Jacco van der Post




More information about the TYPO3-english mailing list