NO BUG: Polylang flag selector element size & hover

Browser: Chrome 110
OS: macOS / Windows / Linux / etc.
URL: https://hotelsuissebellagio.it/
Video: Jam

Good morning everyone,
I noticed that there are 2 bugs with Polylang:

  • when I set the language selector and activate the flag, even if I set the flag size, it is not shown
  • when I go to change the hover, the color is not set.

I attached a video to better explain the problem.

Thanks a lot,
Stefano

Hi,
Welcome to the forum, and thanks so much for your report!

  1. Flags not showing: confirmed and added to the bug tracker.
  2. Hover dropdown background color: I can’t replicate the issue. Can you make the site available so that I can inspect the styles? Currently, it’s in maintenance mode.

CleanShot 2024-10-21 at 10.09.43

Best regards,
timmse

unfortunately I can’t publish the site but I can give public access to view it and see the error:

Thanks :slight_smile:
Stefano

Thanks! I removed the login data from your response :v:

I misunderstood the problem—it’s about the “dropdown content”, not the button itself. We simply render the dropdown provided by Polylang by calling this function, which uses the default system UI, so the settings won’t have the desired effect.

Hi @Ste.ARI,

Sorry for the confusion regarding the flag display! Just like the dropdown content styling, the language switcher, including flags, is rendered using Polylang’s own function pll_the_languages() (see documentation here: Function reference – Polylang).

Polylang doesn’t render flags within dropdowns, as explained here: The language switcher – Polylang. Directly from their documentation:

“If you choose this option for the widget, it is not possible to display flags due to HTML limitations. It is however possible to work around this limitation with JavaScript (not provided by Polylang).”

Since this is a limitation within Polylang, not Bricks, we recommend reaching out to their support team if you’d like to add flags within dropdowns using JavaScript. Additionally, the Polylang developer has confirmed on the WordPress forum that this is unsupported functionality: Language dropdown switcher with flags only in widget | WordPress.org.