Skip Navigation

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

Problem:
The client is trying to place the language switcher at the top right of their site, separate from the menu container. However, the built-in functionality places it next to the menu options, causing layout issues.
Solution:
1. We suggested using shortcodes or PHP to place the language switcher in any custom location. Documentation on adding language switchers using PHP and shortcodes can be found here: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/
2. An alternative solution involves editing the Menu Language Switcher settings within WPML to either make it a dropdown or hide the current language flag, which saves space in the design.
3. For a custom placement outside of the header container, custom coding is required. This falls outside our support policy, and we recommend hiring a WPML contractor or a developer for assistance. You can find WPML contractors here: https://wpml.org/contractors
4. We also provided a link to our documentation for creating a custom language switcher with WPML, which might be useful: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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 0 reply, has 1 voice.

Last updated by Mihai Apetrei 3 months, 2 weeks ago.

Assisted by: Mihai Apetrei.

Author Posts
January 30, 2025 at 3:38 pm #16652672

brunoS-50

Background of the issue:
I am trying to place my language switcher at the top right of the site hidden link. The built-in functionality is placing it inside the Menu container next to the menu options.

Symptoms:
One of the menu options is moving to the left side of the logo, making my top navigation unbalanced.

Questions:
How can I place the language switcher next to the navigation but at the very right of the place?

January 30, 2025 at 3:38 pm #16652676

brunoS-50

Here's what is causing

Screenshot 2025-01-29 at 12.43.34.png
January 30, 2025 at 5:19 pm #16653039

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

I can't see that menu and the language switcher from your screenshot on this site (hidden link).

I see only the text from the screenshot I attached, placed at the bottom of the page.

You can also place a language switcher in any custom location you want by using shortcodes or, if you feel comfortable with code, you can use PHP:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/

I hope that you will find this information helpful.

Please let me know how things go.

Mihai Apetrei

Screenshot 2025-01-30 at 19.17.13.png
January 30, 2025 at 6:11 pm #16653210

brunoS-50

Hi,

I'm sorry for not being clear enough. The issue I am talking about is only showing on a part of the site that is not accessible from the current home.

Please, have a look here:

hidden link

February 1, 2025 at 9:51 am #16658103

brunoS-50

Hi Mihai,

Thank you for your help on this so far. I'm afraid the solution you're suggesting it's not what I'm looking for. I really want the switcher to be placed further apart from the navigation. See my attached visual illustrating where I am looking for this to be placed.

Can we do it?

Thanks

switcher.png
February 5, 2025 at 10:04 am #16669993

brunoS-50

Hi,

I was expecting that this kind of support would be provided by you. The customisation I am requesting is something that I see across the web and having a plugin that doesn't allow to replicate such execution is a bit of a disappointment. Specially for a plugin that I feel is the bread and butter of online wordpress translation.

Pointing your clients in the right direction on how to solve things using your documentation would be the expected kind of response.

February 5, 2025 at 11:35 am #16670625

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there and thank you so much for your valuable feedback.

I completely understand that this approach may not seem very friendly at first glance, but the truth is this would be the best that we can do in a case like this one, and that is because WPML doesn't control the position where the language switcher will show up.

The positions are defined inside the theme that a website is using (in our case, the "Uncode" theme). So, if a theme decides to display the menu in a specific position or a specific format, then custom code will be required to change things according to your liking.

There is also this page in our documentation that has an example of creating a custom language switcher with WPML:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-switcher/

I am sharing it because it might help to see a real example and maybe you might find it helpful for your website.

I hope you find this resource useful.

Wishing you a fantastic rest of your day!

Mihai