Last Updated: February 25, 2016
·
5.506K
· blang

Typo3 Language switch inside DCE Fluidtemplate

<a href="{dce:typolinkUrl(parameter:'{site.product.contacturl}')}" title="" class="button">
 <f:if condition="{TSFE.sys_language_uid} == 1">
     <f:then>
        Kontakt aufnehmen
    </f:then>
    <f:else>
        Contact
    </f:else>
 </f:if>    
</a>

1 Response
Add your response

It would be better to use f:translate and link with LLL: to a locallang xml, to translate stuff. This code will just work if german has been defined as syslanguageuid 1. The translate viewhelper will automatically respect what you have configured in typoscript.

Cheers,
Armin Vieweg

over 1 year ago ·