Skip to content Skip to sidebar

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

Problem:
The floating language switcher was not appearing on the client's site even after translations were approved.
Solution:
We added the following steps to resolve the issue:
1. Inserted this code into the

functions.php

file of the active theme:

add_action('wp_footer', 'wpml_floating_lang_switcher');<br /><br />function wpml_floating_lang_switcher() {<br />    echo '<div class="wpml-floating-language-switcher">';<br />        do_action('wpml_add_language_selector');<br />    echo '</div>'; <br />}

2. Added CSS to style the language switcher in Appearance >> Customize >> Additional CSS:

.wpml-floating-language-switcher .wpml-ls-statics-shortcode_actions {<br />  margin-bottom: 0;<br />}<br /><br />.wpml-floating-language-switcher  .wpml-ls-statics-shortcode_actions a {<br />  background-color: transparent !important;<br />}<br /><br />.wpml-floating-language-switcher .wpml-ls-legacy-list-horizontal a {<br />  padding: 5px;<br />}<br /><br />.wpml-floating-language-switcher {<br />   position: fixed;  <br />  bottom: 70px;  <br />  right: 20px;  <br />  z-index: 99999;  <br />  background: white;  <br />  border-radius: 16px;  <br />  box-shadow: 0 4px 16px rgba(0,0,0,0.12);  <br />  padding: 8px 16px; <br />   z-index: 99999;  <br />  -webkit-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);<br />  -moz-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);<br />  box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);<br />}

3. Configured the language switcher to display only flags via WPML >> Languages > Custom Language Switcher by pressing the Customize button.

For more details on customizing language switchers, visit Custom Language Switcher documentation.

If this solution does not resolve your issue or seems outdated, please check related known issues, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket here.

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

Last updated by premium-rallyI 4 days, 18 hours ago.

Assisted by: Noman.

Author Posts
September 23, 2025 at 12:20 pm #17425058

premium-rallyI

Background of the issue:
I am trying to get the floating language switcher to appear on my site, hidden link. My previous support ticket was marked as resolved, but the issue persists. I was informed by support that there were no translations, but I found translations pending and approved them.

Symptoms:
The floating language switcher is not showing on my site.

Questions:
Why is the floating language switcher still not appearing after approving translations?

September 23, 2025 at 12:44 pm #17425166

Noman
WPML Supporter since 06/2016

Languages: English (English )

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

As you have already followed the below doc: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/ but the issue still persists.

To take a closer look at this issue, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

Your next answer will be private, meaning only you and I can access it.

=== Please backup your database and website ===

✙ I would need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.

Thank you

September 23, 2025 at 3:31 pm #17426239

Noman
WPML Supporter since 06/2016

Languages: English (English )

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

Thanks for providing the login details. I followed the below steps:

1. Added below code in functions.php file of active theme:

add_action('wp_footer', 'wpml_floating_lang_switcher'); 
  
 function wpml_floating_lang_switcher() { 
    echo '<div class="wpml-floating-language-switcher">';
        
        do_action('wpml_add_language_selector');
    echo '</div>'; 
}

2. Added the below CSS in Appearance >> Customize >> Additional CSS:

.wpml-floating-language-switcher .wpml-ls-statics-shortcode_actions {
  margin-bottom: 0;
}
  
.wpml-floating-language-switcher  .wpml-ls-statics-shortcode_actions a {
  background-color: transparent !important;
}
  
.wpml-floating-language-switcher .wpml-ls-legacy-list-horizontal a {
  padding: 5px;
}
  
.wpml-floating-language-switcher {
   position: fixed;  
  bottom: 70px;  
  right: 20px;  
  z-index: 99999;  
  background: white;  
  border-radius: 16px;  
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);  
  padding: 8px 16px; 
   z-index: 99999;  
  -webkit-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
  -moz-box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
  box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.25);
}

3. Choose only flag option from WPML >> Languages > Custom Language Switcher by pressing the Customize button.

Now it shows the floating language switcher as you can see in the attached screenshot.

Here is a doc for more details:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

floating switcher 1.jpg
September 24, 2025 at 10:31 am #17428639

premium-rallyI

Hello,

Yes the language switcher is now visible and working. Thank you for the help. But I ran on some issue that I am not sure how to resolve it. When I click on the language that is translated (which is Bulgarian language) on all the pages there is an added header on top that its not there on the original version. Have you encountered a problem like this?

Regards

September 24, 2025 at 10:48 am #17428732

premium-rallyI

Sorry I have managed it when I took a closer look! Thank you for everything!