[TYPO3-english] Language menu

Peter Klein peter at umloud.dk
Thu Oct 16 13:33:35 CEST 2008


Hi Stephen.

I haven't used languagemenus much so this is not tested.
But the setCurrent part looks like it relies on optionSplit, so you
should be able to do something similar on the stdWrap.wrap part. (But
I don't see how you get the image displayed, just by including the
image resource in the wrap, without HTML IMG tag..)


stdWrap.wrap = flag_en.gif <p class="langOpt">|</p> || flag_de.gif <p
class="langOpt">|</p> || flag_es.gif <p class="langOpt">|</p> ||
flag_fr.gif <p class="langOpt">|</p> || flag_it.gif <p
class="langOpt">|</p> || flag_nl.gif <p class="langOpt">|</p> ||
flag_se.gif <p class="langOpt">|</p>


--
Peter Klein


On Thu, 16 Oct 2008 03:56:02 -0700 (PDT), StephenBungert
<stephenbungert at yahoo.de> wrote:

>
>Hello List.
>
>Here is the TS I'm using for a language menu:
>
>
>
>lib.langMenu = HMENU
>lib.langMenu {
>  special = language
>  special.value = 0,1,3,2,4,6,5
>  special.normalWhenNoLanguage = 0
>  1 = TMENU
>  1 {
>    wrap = {$hMenuBefore}|{$hMenuAfter}
>    NO = 1
>    NO {
>      stdWrap.setCurrent = English || Deutsch || Español || Français ||
>Italiano || Nederlands || Svenska
>      stdWrap.current = 1
>      temp = current
>      allWrap = {$itemBefore}|{$itemAfter}
>      stdWrap.wrap =  fileadmin/templates/fmfdemand/images/flag_de.gif <p
>class="langOpt">|</p>
>    }
>    
>    ACT < .NO
>    
>    # Language that is NOT available:
>    USERDEF1 < .NO
>    USERDEF1.doNotLinkIt = 1
>  }
>}
>
>It's fine apart form the fact that I want a flag in the stdWrap.wrap.
>
>At the moment they all show the german flag (flag_de.gif). How can I alter
>the biit after flag_ so that it shows the correct flag?
>
>For example: flag_en.gif for the English language, and so on for each
>language. I've tried going through the tsref and googling but can't find a
>solution. Is there someway of using the text string from setCurrent before
>.gif? So that the file names would look something like this:
>flag_Deutsch.gif, so that the flags match the language?
>
>-----
>-- 
>Stephen Bungert


More information about the TYPO3-english mailing list