WPML Conditional Based on Chosen Language

For instances where you want to shift what content is appearing, depending on the WPML’s chosen language in the nav bar.

function prefix_lang(){
     if(ICL_LANGUAGE_CODE=='en'){
          echo 'something';
     }
     if(ICL_LANGUAGE_CODE=='fr'){
          echo 'something else';
     }
}

Leave a Reply

Your email address will not be published.