TYPO3 Reea Blog

This will be shown to users with no Flash or Javascript.

Languages


menu.language = HMENU
menu.language {
  special = language
  special.value = 0,1

  addQueryString = 1
  addQueryString.method=get,post
  addQueryString.exclude = L,cHash

  1 = TMENU
  1 {
    wrap = <ul>|</ul>
     
    		# Remove the (old) default behaviour which adds onfocus="blurLink(this);" to all links
    noBlur = 1
     
    NO = 1
    NO {
      			# Override the standard menu item value (which is the page title) with our own cObject
      stdWrap.cObject = TEXT
       
      			# Use the TypoScript option split function to display different values for the first and second item
      stdWrap.cObject.value = {$contentpage.language1} || {$contentpage.language2}
      allWrap = <li>|</li>
    }
     
    ACT < .NO
    ACT {
      ATagParams = class="active"
    }
  }
}

Languages - varianta


lib.languages = HMENU
lib.languages {
   special = language
   special.value = 0,1,2,3,4,5
   special.normalWhenNoLanguage = 0

   addQueryString = 1
   addQueryString.method=get,post
   addQueryString.exclude = L,cHash

   1 = TMENU
   1 {
     wrap = <ul>|</ul>
     # Normal link to language that exists:
     NO = 1
#     NO.allWrap =  |*|   |  |*| |
     NO.allWrap =  <li>|</li>
     #NO.wrapItemAndSub = |</li>
#     NO.ATagParams= class="nl" || class="en" || class="fr" || class="de" || class="es" || class="it"

#     NO.stdWrap.setCurrent = romana||englisch||deutsch
     NO.stdWrap.setCurrent = nl||en||fr||de||es||it
     NO.stdWrap.current = 1

     # Current language selected:

     ACT < .NO
     ACT.ATagParams= class="act"
	 ACT.allWrap.insertData=1
#     ACT.linkWrap = <li class="active">|</li>|*||*|<li class="lastactive">|</li>

     # Language that is NOT available:
     USERDEF1 < .NO
     USERDEF1.linkWrap = <span class="nl">|</span> || <span class="en">|</span>||<span class="fr">|</span>||<span class="de">|</span>||<span class="es">|</span>||<span class="it">|</span>
#	USERDEF1.linkWrap = </li>

     USERDEF1.doNotLinkIt = 1
   }
}

Meniu pentru limbi de tip dropdown ( cu RealUrl )


lib.languages_new= HMENU
lib.languages_new.special = language
lib.languages_new.special.value = 0,1,5,4,3,6
lib.languages_new.special.normalWhenNoLanguage = 0
lib.languages_new {
  addQueryString = 1
  addQueryString.method=get,post
  addQueryString.exclude = L,cHash
}  

lib.languages_new.stdWrap.outerWrap=<form>|</form>
lib.languages_new.stdWrap.dataWrap= <select class="inform" name="L" onchange="top.location='http://www.domeniu.ro/' + this.options[this.selectedIndex].value">|</select>
lib.languages_new.1 = TMENU
lib.languages_new.1 {

  NO {   
    doNotLinkIt = 1 
    
      stdWrap.cObject = COA
      stdWrap.cObject {
        5 = TEXT
        5.value = <option value="       
        
        10 = TEXT
        10.stdWrap.typolink {       
         parameter.data = TSFE:id       
         additionalParams = &L=0 || &L=1 || &L=5 || &L=4 || &L=3 || &L=6
         returnLast = url
        }
        
        15 = TEXT
        15.setCurrent= ">EN</option> || ">FR</option> || ">中文</option> || ">DE</option> || ">RU</option> || ">ES</option>
        15.current=1
    
    }     
  }

  ACT < .NO
  ACT = 1 
  ACT.stdWrap.cObject.5.value = <option selected="selected" value="
}

Meniu pentru limbi de tip dropdown ( fără RealUrl )


lib.languages_new= HMENU
lib.languages_new.special = language
lib.languages_new.special.value = 0,1,5,4,3,6
lib.languages_new.special.normalWhenNoLanguage = 0
lib.languages_new {
	addQueryString = 1
	addQueryString.method=get,post
	addQueryString.exclude = L,cHash
}	

lib.languages_new.stdWrap.outerWrap=<form>|</form>
lib.languages_new.stdWrap.dataWrap=<select class="inform" name="L" onchange="if(this.options[this.selectedIndex].value != '0')&nbsp;top.location.replace('index.php?id={page:uid}&L=' + this.options[this.selectedIndex].value );&nbsp; else&nbsp;top.location.replace('index.php?id={page:uid}'); ">|</select>
lib.languages_new.1 = TMENU
lib.languages_new.1 {

  NO {   
	linkWrap= <option |</option>
    stdWrap.setCurrent= value="0">EN  || value="1">FR  || value="5">中文   || value="4">DE  || value="3">RU  || value="6">ESP
    stdWrap.current = 1
    doNotLinkIt = 1	
  }

  ACT < .NO
  ACT = 1
  ACT.linkWrap = <option selected="selected" | </option>
}

Notă : Trebuie să se facă traducere pentru toate limbile ce apar in meniu, altfel nu o sa ramana selectata limba X din meniu, daca nu este facuta si o pagina in limba X.

blog comments powered by Disqus