I have created a content template that is working well with a view. I am using WPML for a simple multilingual site. In the site I have a CPT where there is only a line or two that needs to be translated into each language… I want to use this statement:
<?php if(ICL_LANGUAGE_CODE=='nl'); ?> ---do something--- <?php elseif(ICL_LANGUAGE_CODE=='fr'); ?> ---do something else-- <?php endif; ?>
My current setup is this:
[wpv-view name="church-pastor"] Denominatie : [types field="denomitation" output="raw"][/types] [types field="adresse" output="raw"][/types] Eredienst : [types field="tijdstip" output="raw"][/types] [types field="uur" output="raw"][/types] in het [types field="langue" output="raw"][/types] Vleugel : [types field="branche" output="raw"][/types] Website :
Can I set it so it does this, where all info stays the same unless the language is FR then it shows the French custom fields instead?
<?php if(ICL_LANGUAGE_CODE=='nl'); ?> Eredienst : [types field="tijdstip" output="raw"][/types] [types field="uur" output="raw"][/types] in het [types field="taal" output="raw"][/types] <?php elseif(ICL_LANGUAGE_CODE=='fr'); ?> Culte : [types field="jour" output="raw"][/types] [types field="heure" output="raw"][/types] en [types field="langue" output="raw"][/types] ---do something else-- <?php endif; ?>
Thanks!