[TYPO3-english] Show only desired lanague link in Language Selector Menu

Peter Kühnlein peter at function2form.net
Wed May 18 08:01:29 CEST 2016


Am 18.05.2016 um 02:50 schrieb Bosco Montenegro:
> Hello, I'been trying to figure out if it is possible to show just one
> language link in the language selector menu if I have two languagues.
>
> For example: My default language is Spanish, and my alternative language
> is English on my webiste. I would like my language menu selector to show
> only the English link when I am in the Spanish site, and likewise only
> show the Spanish link when I am in the english translation (but note
> both at the same time ....[Spanish | English]).
> Is this possible? and if it is how? I've searched everywhere but with no
> help or anything lke the sort. Please help. Any information will be
> greatly appreciated. Regards,
>
> I am using typo3 6.2.22
>
> Bosco

Hi Bosco,

this is how I implemented something like that for English and German (if 
I got you right):

config.linkVars = L
config.uniqueLinkVars = 1
config.sys_language_uid = 0
config.language = de
config.locale_all = de_DE.UTF8
config.htmlTag_langKey = de
temp.langlink = COA
temp.langlink {
   10 = TEXT
   10.value=Change language 
   20 = IMAGE
   20.file = fileadmin/pics/language_en.jpg
   20.stdWrap {
     typolink.parameter.data = page:uid
     typolink.additionalParams = &L=2
     typolink.ATagParams = class="sprachWahl" lang="en" xml:lang="en"
   }
}
[globalVar = GP:L = 2]
config.sys_language_uid = 2
config.language = en
config.locale_all = en_GB.UTF8
config.htmlTag_langKey = en
temp.langlink = COA
temp.langlink {
   10 = TEXT
   10.value=Sprache ändern 
   20 = IMAGE
   20.file = fileadmin/pics/language_de.jpg
   20.stdWrap {
     typolink.parameter.data = page:uid
     typolink.additionalParams = &L=0
     typolink.ATagParams = class="sprachWahl" lang="de" xml:lang="de"
   }
}
[global]

For design reasons, I had to use small images that indicate which 
language to switch to.

HTH
Peter

-- 

http://function2form.net
http://peter-kuehnlein.net

"If one has no earnest daily intention, does not consider what it is to
be a warrior even in his dreams, and lives through the day idly, he
can be said to be worthy of punishment."
(Hagakure)

Latest projects
http://mein-bobber.de
http://www.käse1a.de


More information about the TYPO3-english mailing list