[TYPO3-english] Re: Language dependent typoscript CONSTANTS

J. Peter M. Schuler j.peter.m.schuler at icb.uni-due.de
Thu Feb 14 16:13:43 CET 2013

Thanks for your reply Bernd.

[Actually default language is defined correctly as non-English in this specific case, but thanks for the hint! - I know, most people don't define default language correctly and even more often don't use something other than English.]

Apologies for my bad explanation, your proposed solution is exactly what I was talking about. 
temp.label1 = TEXT
temp.label1 {
  value = {$constant.label1-default}
  lang.de = {$constant.label1-de}
  lang.nl = {$constant.label1-nl}

But in case on some subsite  {$constant.label1-nl} is empty, the text "{$constant.label1-nl}" is shown instead of the value of default language. To circumvent this, the only idea I could come up with is like prefilling all constants with e.g. "1" and removing the lang if it is not filled:

temp.label1.lang.nl = {$constant.label1-nl}
[globalVar = LIT:1={$constant.label1-nl}]
temp.label1.lang.nl >

But that would be quite messy with an increased amount of languages and labels. I thought with all the power of TypoScript there should be a much cleaner solution.

I hope the question is now a bit clearer.

Thanks again for your time,

More information about the TYPO3-english mailing list