This thread is resolved. Here is a description of the problem and solution.

Problem: I want to be able to only see the available translations languages in the language switcher.

Solution: go to WPML > Settings > Post Type Translation > Set your posts as "translatable - Only show translated items" > press Apply button

Relevant Documentation:

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 matthiasR-5 11 months ago.

Assigned support staff: Alejandro.

Author Posts
June 28, 2019 at 12:38 pm #4107425


I am trying to: We integrated a language menu in our header, some of our pages only have an English translation and no German translation. German is the base language of the site though. WPML still shows the German as a language in the language switcher, which it shouldn't since the language doesn't exist, and if you click on German it just displays the English site.

We integrated the language switcher as following:

$languages = apply_filters('wpml_active_languages', null, 'orderby=id&order=desc');

And then we loop over the languages.

Link to a page where the issue can be seen: hidden link

I expected to see: "DE" to be hidden in the language menu.

Instead, I got: you can see "DE" in the language menu.

June 28, 2019 at 2:55 pm #4108817


Languages: English (English ) Spanish (Español ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Welcome to WPML Support.
I'll do my best to help you solve this issue.

To better understand how to move forward with a solution, could you please provide me with information about your environment by following these steps:

It looks like you set the pages to be translatable but show the fallback option if the page doesn't exist.

You can check this in WPML> settings > Post type translation > Pages > Set it to "translatable - Only show translated items"

Let me know how it goes.

July 1, 2019 at 4:21 pm #4121143


Thanks Alejandro, that solved my issues! Appreciate the quick help! 🙂