[TYPO3-dev] condition on language

Stig Nørgaard Færch snf at dkm.dk
Thu Aug 12 13:35:37 CEST 2010


Den 11-08-2010 21:35, François Suter skrev:
> Hi Stig
>> So I thought that I could do something like:
>> [globalVar = TSFE:lang = dk]
>> But lang doesn't seem to be available as condition?
>
> It could be, but it is based on config.language so it will contain a
> language code only if config.language is properly defined. Otherwise it
> will contain "default".
>
> Alternatively if you're static_info_tables you may try to use
> TSFE:sys_language_isocode which should normally refer to the current
> language by using its 2-letter ISO code.
>
> I haven't tried, but it's what I can guess from the source code.

Thanks for you answer.

I have static_info_tables installed. But:
  page.1=TEXT
  page.1.data = TSFE:sys_language_isocode
doesn't produce anything.

Yes, and you are correct about lang. Even if it worked in a condition, I 
couldn't use it as because of the 'default' value.

Could it be that lang and sys_language_isocode are just not available in 
conditions?

If not - would there be any other solutions that I'm overlooking?

/Stig




More information about the TYPO3-dev mailing list