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 1 voice.

Last updated by Sergio 3 months, 1 week ago.

Author Posts
February 16, 2020 at 12:32 pm #5501883

Sergio

Hello, I am trying to show 2 different HTML codes based on the language.
In /wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Flanguages.php&trop=1 I have two codes: en and pl.

I am trying to use this function in the footer:

<?php
if (ICL_LANGUAGE_CODE == "pl") {
//show the form in Polish
<nav>
<p>test PL</p>
</nav>
} else {
<nav>
<p>test EN</p>
</nav>
}
?>

however i's not working. In the English site it's showing the English code.
In the Polish site, it's not showing at all.

February 16, 2020 at 12:49 pm #5501895

Sergio

My issue is resolved now. Thank you!

The syntax was broken. I had to close php before the html