We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 6 replies, has 2 voices.

Last updated by maxL-15 2 months, 2 weeks ago.

Assigned support staff: Riffaz.

Author Posts
August 26, 2019 at 9:33 pm #4461571

maxL-15

We have a Trusted Shops widget for reviews etc. We have custom codes in every language. Can I show another code in the German language than the Dutch one?

August 27, 2019 at 4:46 am #4462795

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for contacting WPML support.

You did not mention what code you are using or where you are using it.
Typically in WordPress you have to follow this format to use different code for different languages.

<?php

add_action( 'wp_head', 'my_custom_js' ); 
function my_custom_js() {
	if(ICL_LANGUAGE_CODE=='en'){?>
		<!--- your code to english--->
	
	<?php } elseif(ICL_LANGUAGE_CODE=='de'){?>
		<!---your code to german--->

<?php 
	} elseif(ICL_LANGUAGE_CODE=='fr'){?>
		<!---your code to french---
		Global site tag (gtag.js) - Google Analytics -->

<?php 
	} elseif(ICL_LANGUAGE_CODE=='es'){?>
		<!---your code to spanish--->
<?php 
	}
}

Let me know how it goes.

Regards,
Riffaz.

August 27, 2019 at 7:52 am #4463467

maxL-15

It's about HTML code. Where do I paste the code above?

August 27, 2019 at 8:31 am #4463711

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

The above code should go to functions.php

What you are trying to do with your HTML code?
Where do you have it now?

August 27, 2019 at 10:14 am #4464939

maxL-15

It is for the trustedshops reviewwidget in the right corner bottom of the NL site.

It is now in a plugin called Custom CSS HTML

August 27, 2019 at 12:39 pm #4466647

Riffaz
Supporter

Languages: English (English )

Timezone: Asia/Colombo (GMT+05:30)

Hi,

Thank you for the details

Where do you have your HTML code now?
In the theme options? in any widget? in functions.php?
The widget works in NL site now, right? for that where did you add the HTML code?

Let me know.

Regards,

August 27, 2019 at 4:36 pm #4468491

maxL-15

My issue is resolved now. Thank you!