Skip Navigation

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

Problem:
The client wanted to integrate a double flag for Swiss German and Swiss Italian in the language selector. When setting the flag size to auto, the flags were being resized incorrectly, and when trying to set a fixed size with added white space, the flags were enlarged disproportionally.
Solution:
We recommended adding the following line to the

wp-config.php

file:

define( 'WPML_DO_NOT_RESIZE_UPLOADED_FLAGS', true );

We then directed the client to check our guide on Custom Language Flags for further instructions on adjusting the flag size. After these steps, we asked the client to reupload the custom flags and verify if the issue was resolved.

Please note that this solution might be irrelevant due to it being outdated or not applicable to your case. If you're still encountering issues, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.

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

Last updated by Osama Mersal 1 year, 3 months ago.

Assisted by: Osama Mersal.

Author Posts
March 12, 2024 at 11:25 am #15399001

Emmanuel Devys

Hello, in the language selector, I would like to be able to integrate a double flag for Swiss German and Swiss Italian (see attached images).
If I leave the size of the flags in the selector on auto, it resizes the flags for me (doc attached) and if I try to put all the flags at the same size 43 x 12 px by adding white on either side of the single flags, it enlarges them proportionally.
Can you help?
Thanks for your help.

Translated with DeepL.com (free version)

suisse-allemand.png
it-ch.png
March 12, 2024 at 12:05 pm #15399293

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

1) Please log in to this sandbox site and try to replicate the issue. (hidden link)

If the issue is replicable, please let me know how to reproduce it.

2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.

Best regards,
Osama

March 12, 2024 at 1:27 pm #15399586

Emmanuel Devys

HI, I did the work on your sandbox and please find hereby the debug info.

Emmanuel

March 12, 2024 at 2:18 pm #15399955

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi Emmanuel,

Thanks for replicating the issue. I've added the following line to wp-config.php.

define( 'WPML_DO_NOT_RESIZE_UPLOADED_FLAGS', true );

Please check this guide. (https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-flags/#adjusting-the-flag-size)

After that, I reuploaded the custom flags. Kindly check if the flags work correctly. (hidden link)

Best regards,
Osama

March 12, 2024 at 2:40 pm #15400115

Emmanuel Devys

Thank you for your help. It is working well now and I added also your adittional CSS code !
Best regards.