Menu


How to read language labels from Typo3 language files using typoscript



Sometimes we need to use language labels in multilanguage sites that need to be generated from typoscript.

Method 1 (simple text)

page.10 = TEXT
page.10 {
  value = Your default text
  lang.fr = The same text in french
}


Method 2 (Usually language labels are stored in Typo3 language files in xml format)


page.10 = TEXT
page.10.data = LLL:fileadmin/general.xml:labeltitle


Method 3 (using the text in a generated image file)

temp.imagebutton = COA
temp.imagebutton{
 2 = IMAGE
 2{
             file=GIFBUILDER
             file{
                  XY=[10.w]+10,45
                  backColor= #5C5C5C
                  transparentBackground = 1
                  10=TEXT
                  10{
                     text = data
                     text.data = LLL:fileadmin/templates/lang/locallang.xml:imagetitle
                     text.insertData=1
                     fontSize = 13
                     fontFile=fileadmin/templates/font/arial.ttf
                     fontColor = #ffffff
                     offset = 10,24
                  }
              }
   }
   2.stdWrap.typolink.parameter=12
}


This last method is the most complex one. We do several operations:
- read language label
- generate image
- and link the generated image

Sure there are more variations of this but you can do that from these examples




Google Search

 
wiki.lacisoft.com
WWW
2009-2011 (c) Lacisoft.com