Skip Navigation

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

Problem:
The client wanted to add country names next to the flags in the WPML language switcher dropdown and was also experiencing an issue where the login/register option disappeared after integrating WPML.

Solution:
For adjusting the size of the dropdown, we provided custom CSS:

@media (min-width:1023px) {<br />#mega_main_menu li.wpml-ls-item.default_dropdown>.mega_dropdown {<br />width: 54px !important;<br />}}<br />

To display language names next to flags in the dropdown, we instructed the client to go to WPML > Languages > Menu language switcher section, edit the settings, select the checkbox to show the language name, and save.

Regarding the issue with the missing login/register option, we suggested opening a new support ticket as per our Support Policy of handling one issue per ticket.

For the request to show country names instead of language names, we clarified that WPML does not support country names by default. We suggested that this could be achieved with custom coding using jQuery or by hiring a WPML contractor or front-end developer, as it falls outside our Support Policy.

If this solution doesn't look relevant, please open a new support ticket.

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

Last updated by Mihai Apetrei 1 year, 4 months ago.

Assisted by: Mihai Apetrei.

Author Posts
December 6, 2023 at 3:50 pm #15009629

philipv-13

Hi,
Is it possible to add the countries by the dropdown of the flags?
Now you see a lot of emty space.
I couldn't find this in the settings.
See also printscreen.
Thanks.

dropdown.png
December 6, 2023 at 7:47 pm #15011929

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

I was able to find that there's some existing custom CSS that controls that area.

We can make it smaller so that it looks nicer (as you see in my screenshot).

You can go to Appearance > Customiser > Custom CSS > Add the following CSS code and save:


@media (min-width:1023px) {
#mega_main_menu li.wpml-ls-item.default_dropdown>.mega_dropdown {
width: 54px !important;
}}

Please let me know if that does the trick for you 🙂

Kind regards,
Mihai Apetrei

Screenshot 2023-12-06 at 21.46.15.png
December 6, 2023 at 10:37 pm #15012569

philipv-13

Hi,
It is smaller now. But it would not be possible to make it bigger with next to the flag the name of the language in the dropdown?

And another question,
After the integration of WPML I noticed that the login/ register option in the topmenu in the right corner dissapeared.
Like it is here:
hidden link
You have any idea why that is?
Thanks.

December 7, 2023 at 10:05 pm #15021339

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

But it would not be possible to make it bigger with next to the flag the name of the language in the dropdown?

I think you should be able to do that, yes. You can go to WPML > Languages > search for the "Menu language switcher" section > edit the settings for it > and select the checkbox so that it shows the language name > save.

Please let me know how that goes.

In regards to the new issue that you mentioned, I have no idea why would that happen but feel free to open a new ticket and we will be happy to take a deeper look.

Per our Support Policy, we can handle only one issue per ticket.

Continuing with one issue per ticket helps not only supporters to focus on one issue at once, but also enables other users to find solutions to their questions faster.

Thank you so much for your understanding!

Mihai

December 9, 2023 at 12:00 pm #15029089

philipv-13

Hi Mihai,
I saw that option, but it put's also the name in the navigation, and makes the navigation too wide. So I just wanted the names of the countries in the dropdown. But I think that would be not possible?
Thanks.

December 9, 2023 at 10:33 pm #15030027

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

The name of the language is what we have available at this moment, we don't have the country names.

I personally never met a situation where someone would want to use the country name instead of the language name but I definitely understand that this would work great and would make a lot of sense for specific situations.

Most people use just the flags, because it looks nicer and it doesn't take a lot of space, some of them use the language name only without flags, and some of them use both.

As these are the most requested and used combinations, probably this is why our developers never took country names in consideration as an extra alternative.

This can be accomplished with some custom coding, with the jQuery Javascript library for example, but custom coding falls out of the purpose of our Support Policy so I recommend getting in touch with a front-end developer or a WPML contractor (http://wpml.org/contractors) if you really need/want that feature.

I hope that you will find this info helpful 🙂

Have a lovely rest of the weekend!

Mihai

December 10, 2023 at 9:54 pm #15032393

philipv-13

Hi Mihai,
Sorry for the confusion, the name of the language is ok.
I meant that I wanted in the dropdown only, to see the names and not in the topbar.
See printscreen.

languages-translated.png
December 11, 2023 at 5:57 pm #15039973

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

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

Hi there.

Now things are way clearer 🙂 Thank you for the help.

You will need some more custom CSS code to accomplish that (targeting the current language and removing any text) but this will be more complex than the initial example I shared with you so I recommend that you hire a WPML contractor (http://wpml.org/contractors/) or a front-end developer for this.

Custom coding work falls out of the purpose of our Support Policy but we try our best to help as much as we can when things are not too complex.

Mihai

December 11, 2023 at 10:25 pm #15041345

philipv-13

Ok, thanks.
I leave it by that than.