Skip Navigation

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

Problem:
The client is trying to display only the non-current languages in the top WPML language switcher using the Elementor WPML Language Switcher widget.
Solution:
We recommend the following steps to achieve this:
1. Ensure you back up your site for safety reasons.
2. Edit the Elementor header template and remove the WPML Language Switcher widget.
3. Add a "Shortcode" widget and insert the following shortcode:

[wpml_language_selector_widget]

4. Navigate to WPML >> Languages >> Custom Language Switchers, select the "Enable" checkbox, and click the "Customize" button.
5. In the "Language switcher style" dropdown, select "Vertical list", uncheck the "Current language" checkbox, and click the Save button. This will hide the current language from the language switcher.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Noman 1 year, 1 month ago.

Assisted by: Noman.

Author Posts
November 18, 2023 at 2:08 am #14867107

ronaldT-5

Tell us what you are trying to do? Display only the non-current language on the top WPML language switcher

Is there any documentation that you are following? no

Is there a similar example that we can see? staging14.home-alarm.ca

What is the link to your site? hidden link

Screenshot 2023-11-17 at 9.06.19 PM.jpg
November 19, 2023 at 8:24 am #14869647

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Sorry, it’s not possible to exclude the current language from the language switcher when you use the built-in Elementor WPML Language Switcher widget as mentioned here in this errata: https://wpml.org/errata/elementor-its-not-possible-to-fully-customize-wpml-language-switchers-widget/

The workaround is also given in the above errata and the steps will be as follows:

1. Please take a backup of your site first for safety reasons.

2. Please Edit the Elementor header template and remove the WPML Language Switcher widget.

3. Add the “Shortcode” widget and add the below shortcode in it:

[wpml_language_selector_widget]

4. Please go to WPML >> Languages > Custom Language Switchers choose the “Enable” checkbox option and press the “Customize” button.

5. Choose the “Vertical list” option from the “Language switcher style” dropdown, uncheck the “Current language” checkbox, and press the Save button. It will hide the current language from the language switcher.

Please let me know if this helps resolve your issue or if you need any more help.

Thank you

wpml shortcode.png
disable current language.png