[TYPO3-english] Language dependent typoscript CONSTANTS

bernd wilke t3ng at bernd-wilke.net
Thu Feb 14 16:38:23 CET 2013

Am 14.02.2013 16:13, schrieb J. Peter M. Schuler:
> 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.

I don't think that the value is empty.
it is not defined at all. otherwise the empty value would be inserted 
(instead of the name).

so you can prevent the occurence of your constant-names by defining all 
your constants initially empty in a TS-template no editor got access and 
which is included at the beginning:

constant.label1-default =
constant.label1-de =
constant.label1-nl =

afterwards an editor may redefine these constants (or not)

constant.label1-default = this is englisch text
constant.label1-de = die ist deutscher text
constant.label1-nl = ... (i don't speak dutch ;)


More information about the TYPO3-english mailing list