Realurl chagned when change Languages from Drop Down menu…!

Hello Friends,

Today i face Problem with the Multi language with Drop down Menu in Typo3.

I have finished my project task and end of this realurl problem also solved, but i forgot to test is with the languages.

works fine without language changes but when we changed the language it problem with the realUrl.
So my friend Tarang Patel help me for this.

He gives me following TS for the Solution and its running successfully.

#—————- Language Menu With Dropdown List……………………………

lib.language_menu = COA
lib.language_menu {
10 = TEXT
10 {
typolink.parameter.data = page:uid
typolink
typolink.addQueryString = 1
typolink.addQueryString.method = GET
typolink.addQueryString.exclude = cHash,L
typolink.additionalParams.cObject = COA
typolink.additionalParams.cObject {
10 = TEXT
10.wrap = |&L=0
}
typolink.returnLast = url
dataWrap = <option value=”http://{getenv:HTTP_HOST}/|”>German</option>
}
20 < .10
20.typolink.additionalParams.cObject.10.wrap = |&L=1
20.dataWrap = <option value=”http://{getenv:HTTP_HOST}/|”>English</option>
30 < .20
30.typolink.additionalParams.cObject.10.wrap = |&L=2
30.dataWrap = <option value=”http://{getenv:HTTP_HOST}/|”>Spanish</option>

wrap = <form action=”#” method=”get”><select name=”nav” onchange=”document.location.href = this.value; return true;”>|</select></form>
}
[globalVar = GP:L=0]
lib.language_menu.10.dataWrap = <option value=”http://{getenv:HTTP_HOST}/|” selected=”selected”>German</option>
[global]

[globalVar = GP:L = 1]
lib.language_menu.20.dataWrap = <option value=”http://{getenv:HTTP_HOST}/|” selected=”selected”>English</option>
[global]

[globalVar = GP:L = 2]
lib.language_menu.30.dataWrap = <option value=”http://{getenv:HTTP_HOST}/|” selected=”selected”>Spanish</option>
[global]

 

#————– END of the Language Menu……………………..

Contact me : pradeep4net@gmail.com
Skype : pradeep4net

Thanks,
Pradeep

Leave a Reply