donators

n@work Internet Informationssysteme GmbH
Your ad here

supported by

 TYPO3 Hamburg
 TYPO3 Anbieter

Advertising

Localizing texts in typoscript

 

01.03.08 16:06 Age: 224 days

If you are writing typoscripts you often include texts like "more info". In multi language sites this texts have to be localized.

This is the most simple setup based on the config.language value. Notice that it will work with all stdWrap-properties:

  1.  
  2. page.10 = TEXT
  3. page.10 {
  4.   value = Text in default language
  5.   lang.de = Text in deutsch
  6. }
  7.  

 

If you need more translations and you want to seperate them from your ts-code try to use locallang.xml files like here:

  1.  
  2. page.20 = TEXT
  3. page.20.data = LLL:fileadmin/locallang_fe.xml:localisation_key
  4.  

locallang.xml

  1.  
  2. <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  3. <T3locallang>
  4.     <data type="array">
  5.         <languageKey index="default" type="array">
  6.                     <label index="localisation_key">Localised Key in Default Language</label>
  7.         </languageKey>
  8.         <languageKey index="de" type="array">
  9.                     <label index="localisation_key">Deutsche Übersetzung des Keys</label>
  10.          </languageKey>
  11.     </data>
  12. </T3locallang>
  13.  

Found a mistake?

If you found a mistake or if you have a good tip or suggestion, please contact me at thomas(at)typo3-unleashed.net. I will check it and correct the entry or insert the new one.

Thanks in advance for your help.