Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Harshad 8 years, 2 months ago.

Assigned support staff: Harshad.

Author Posts
June 7, 2012 at 11:21 am #62190


Hello, Is there a simple php code that shows custom text in another langauges if this language is called. Example like:
<?php if($_GET['lang'] == 'de'){ ?>
<?php } else { ?>

,or somthing like that?

June 8, 2012 at 5:51 am #62288


Dear Joeri,

In this event, you can use WPML constant ICL_LANGUAGE_CODE with combination of conditional statements.

For example:

<?php if(ICL_LANGUAGE_CODE == 'de'){ ?>
<?php } elseif(ICL_LANGUAGE_CODE == 'en') { ?>
<?php } ?>

The topic ‘[Closed] Simple php code to call translation’ is closed to new replies.