Skip Navigation

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

Last updated by Nigel 1 year, 5 months ago.

Assisted by: Nigel.

Author Posts
November 6, 2022 at 1:27 am #12390225

david

Hi I selected my custom flags for language switcher, however if I loaded flags as custom flags in language admin setting under wplml, size wasnt good - it was somehow auto-resized. SO I simply replaced that flags in res/folder and flags were correctly displayed and nice. However after I recently updated to last version of wpml and again replaced en.png and cs.png in res/folder with my flags - flags now looks terrible and rasterized. What happened? Why is not displaying flags as before so they looks nice and not rasterized?

flags.jpg
November 7, 2022 at 12:54 am #12393703

david

I somehow resolve that, but have another problem.

1) Flags are now too far bwtween each other, I need flags to be more close each other, can somebody help me with some css code how to do that?

2) Also have another problem after WPML update to latest version. If I hover mouse over flag, there is not description popup window with language name but instead of that it shows css code tag. Go to my site hidden link and mouse over flag and you will see ...

flags2.jpg
November 7, 2022 at 11:49 am #12398911

Laura
Supporter

Languages: English (English ) Italian (Italiano )

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

Hi,

thanks for contacting us.

We just released WPML 4.5.13, could you please update to that and see if it fixes the issue?

If it doesn't, please provide us with your debug information https://wpml.org/it/faq/provide-debug-information-faster-support/

November 7, 2022 at 12:01 pm #12399081

david

Problem is still therem, even after update.

November 8, 2022 at 12:40 am #12404603

david

Summary what I need to achieve:

1) bring language switcher flags more close each other. See screenshot - I made mockup how close I need flags to be approximately

2) fix language switcher flags tooltip. Normally when mouse over flag, name of language appear in tooltip. After last WPML updates this not work anymore, instead of lamguage name tooltip shows some css line with tag img class. I need to fix that so flag tooltip again show language name, as it should work this way.

November 8, 2022 at 8:37 am #12407399

david

screenshot how flags should be close to each other

flags3.jpg
November 9, 2022 at 10:32 am #12418869

Marcel
Supporter

Languages: English (English ) German (Deutsch )

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

Hi there,

both issues are not caused by WPML.

1) The flags' separation comes from your custom theme's CSS. You are adding a global 20px padding to separate the menu entries more wide, which also affects the language switcher inside the same class. This is the CSS class which causes the issue:

header nav ul li a {
}

You can adjust the CSS from your theme, so it doesn't affect the WPML language switcher.

2) Your theme adds a title="" attribut, which adds the tooltip. You will need to fix this in your theme. I recommend you change that attribute to a regular a link.

If you need further help, I recommend you contact a certified WPML developer who can help you make the necessary changes in your custom theme: https://wpml.org/contractors/.

Best Regards
Marcel

November 9, 2022 at 10:52 am #12419087

david

Hello Marcel, but before I updated WPML to latest version it was just fine. Problem appeared after WPML update. So WPML update was caused that.. If I rollback to previously installed version, which was about 2 years old, everething is okay. How is that possible?

November 10, 2022 at 11:30 am #12428909

Nigel
Supporter

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

Hi there

Let me take over here.

The spacing of the flags is simply determined by the theme styles for your menu. The menu is generated as a ul of li items, and the flags are just another li containing a link, so they are affected by the same CSS rule as the other menu links:

header nav ul li a {
  padding: 0 20px;
}

I'm not sure how a change in WPML version could affect this, inasmuch as WPML doesn't apply styling that affects the padding. Perhaps if you are reverting to backups with earlier versions, you are also rolling back theme and/or WordPress versions, too, which might account for any change.

In any case, it should be easy enough to override the flag padding with this:

header nav ul li.wpml-ls-menu-item a {
  padding: 0 4px;
}

(You can modify the suggested 4px size accordingly.)

But I don't know where the title attributes responsible for the tooltips are coming from, title attributes are not normally applied, so it looks like something else may be injecting them.

Do you have a staging site where you can do some testing?

In particular, can you disable all non-WPML plugins and check whether the tooltip problem persists?

If it does then it would be necessary to test switching to a default theme such as twentytwentyone and checking again.

Try to locate anything which triggers the problem so that we can look into that further.

November 10, 2022 at 2:10 pm #12430795

david

Hi, thanks for css for fix distance between flags - it worked :-). Regarding tooltip - I disabled all plugins but its still same. If I delete latest WPML and upload backed up old version installed about 2 years ago its okay (I dont know which version of wpml it is as I agaiun revert back to latest version and forgot note version of older one - can I find this infiormation somewhere in files in wpml folder)?. Im using Wp 5.0.18. Are you sure that problem isnt caused by incompatiiblity of latest wpml with WP 5.0.18?

November 11, 2022 at 10:41 am #12438391

Nigel
Supporter

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

I have downloaded WordPress version 5.0.18 and created a test site with the current version of WPML, and it doesn't have the tooltip problem.

Can you switch to a default theme like twentytwentyone and see if the problem persists?

It sounds like your theme is the last thing we haven't eliminated.

November 11, 2022 at 10:22 pm #12442017

david

Hello, I tried activate all default themes supplied with WP - if I do so, there is not tooltip if mouse over flags at all

November 14, 2022 at 10:39 am #12452667

Nigel
Supporter

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

That sounds right. WPML with a default theme doesn't add tooltips, so that seems to confirm that your theme is adding the tooltips (which are broken).

Can you zip up your theme and share it with me (via dropbox or similar; you don't need a private reply, and link you share will automatically be private).

November 14, 2022 at 12:05 pm #12453629

david

Hi isnt faster if I give you access to my site?

November 14, 2022 at 1:09 pm #12454395

Nigel
Supporter

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

I only need to test your theme, I shouldn't need the whole site to do that (I'm trying to isolate the issue).

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.