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

Last updated by stevenH-12 1 year, 8 months ago.

Assigned support staff: Mihai Apetrei.

Author Posts
October 19, 2018 at 9:23 am #2831357


I'm using a piece of code I found in this topic:

It just looks at the language the visited page is in and shows content based on that language.

I have 4 languages in my site. Dutch (nl), French (fr), English (en) and German (de).

I'm using these shortcodes to add content based on the language:
[wpml_language language='nl'][/wpml_language]
[wpml_language language='fr'][/wpml_language]
[wpml_language language='en'][/wpml_language]
[wpml_language language='de’][/wpml_language]
(and insert specific text in between the bracketed code)

It works fine with 'nl', 'fr' and 'en' but it does not show anything for 'de'.
Is this language code correct for German? And if so, what am I missing that this does not work.

October 19, 2018 at 4:01 pm #2832639

Mihai Apetrei

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi and thank you for contacting WPML Support!

I will be happy to help you with this.

From what I can see, you are using a different ending bracket here: 'de’

Can you try to use this: 'de' and see if this fixes the issue?

Please let me know if this solved your issue or if you still need help.

I will be waiting for your response.

Kind regards,

October 23, 2018 at 8:22 am #2841394


My issue is resolved now. Thank you!