Skip Navigation

[Resolved] WPML Custom Language Switchers not resized by Toolset Types in backend GUI

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by smileBeda 3 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1553313

When you use a Custom Language Switcher Flag as added to WPML > Languages > Site Languages > Edit Languages > Custom Flag, in Toolset types Post Relationships GUI that flag will display with the original size as uploaded to the WPML settings.

This is unexpected, Types does not resize the flag when displaying it, instead, it pulls the original image.
It should, however, resize it to some standard hardcoded size, possibly 18x12px as recommended or similar as done by WPML core in the WordPress Admin Bar Language Switcher (where the flag displays correctly)

#1553577

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please confirm what is the size of the image you uploaded as a custom flag at:
=> WPML > Languages > Site Languages > Edit Languages > Custom Flag

Can you please upload the same image/flag you setup as custom flag somewhere and send me the link to download it so I can check with the same custom flag image.

#1553765
Bildschirmfoto 2020-03-17 um 22.02.27.png
Bildschirmfoto 2020-03-17 um 22.01.38.png

Hello MInesh please try any image bigger than 18 by 12 pixel
Let's use this nice custom SVG flag:

1. Create a file with this content and save as tetst-flag.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="<em><u>hidden link</u></em>" xmlns:xlink="<em><u>hidden link</u></em>" version="1.1" id="english" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<circle style="fill:#F0F0F0;" cx="256" cy="256" r="256"/>
<g>
	<path style="fill:#0052B4;" d="M52.92,100.142c-20.109,26.163-35.272,56.318-44.101,89.077h133.178L52.92,100.142z"/>
	<path style="fill:#0052B4;" d="M503.181,189.219c-8.829-32.758-23.993-62.913-44.101-89.076l-89.075,89.076H503.181z"/>
	<path style="fill:#0052B4;" d="M8.819,322.784c8.83,32.758,23.993,62.913,44.101,89.075l89.074-89.075L8.819,322.784L8.819,322.784   z"/>
	<path style="fill:#0052B4;" d="M411.858,52.921c-26.163-20.109-56.317-35.272-89.076-44.102v133.177L411.858,52.921z"/>
	<path style="fill:#0052B4;" d="M100.142,459.079c26.163,20.109,56.318,35.272,89.076,44.102V370.005L100.142,459.079z"/>
	<path style="fill:#0052B4;" d="M189.217,8.819c-32.758,8.83-62.913,23.993-89.075,44.101l89.075,89.075V8.819z"/>
	<path style="fill:#0052B4;" d="M322.783,503.181c32.758-8.83,62.913-23.993,89.075-44.101l-89.075-89.075V503.181z"/>
	<path style="fill:#0052B4;" d="M370.005,322.784l89.075,89.076c20.108-26.162,35.272-56.318,44.101-89.076H370.005z"/>
</g>
<g>
	<path style="fill:#D80027;" d="M509.833,222.609h-220.44h-0.001V2.167C278.461,0.744,267.317,0,256,0   c-11.319,0-22.461,0.744-33.391,2.167v220.44v0.001H2.167C0.744,233.539,0,244.683,0,256c0,11.319,0.744,22.461,2.167,33.391   h220.44h0.001v220.442C233.539,511.256,244.681,512,256,512c11.317,0,22.461-0.743,33.391-2.167v-220.44v-0.001h220.442   C511.256,278.461,512,267.319,512,256C512,244.683,511.256,233.539,509.833,222.609z"/>
	<path style="fill:#D80027;" d="M322.783,322.784L322.783,322.784L437.019,437.02c5.254-5.252,10.266-10.743,15.048-16.435   l-97.802-97.802h-31.482V322.784z"/>
	<path style="fill:#D80027;" d="M189.217,322.784h-0.002L74.98,437.019c5.252,5.254,10.743,10.266,16.435,15.048l97.802-97.804   V322.784z"/>
	<path style="fill:#D80027;" d="M189.217,189.219v-0.002L74.981,74.98c-5.254,5.252-10.266,10.743-15.048,16.435l97.803,97.803   H189.217z"/>
	<path style="fill:#D80027;" d="M322.783,189.219L322.783,189.219L437.02,74.981c-5.252-5.254-10.743-10.266-16.435-15.047   l-97.802,97.803V189.219z"/>
</g>
</svg>

2. Save and upload it as WPML custom language switcher flag
3. Create a Toolset relationship and observe the non-resized flag used for the relationship GUI when editing posts in relationships

#1554531

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I see the issue and I'm able to reproduce it. I'll escalate it to our next level support for further debugging. Please hold on for further updates.

#1666995

This issue is resolved by the latest Types release:
Fixed an issue with custom WPML language flags being displayed in original size in various places in Types.

I also confirmed it's working on the related site.

Thank you!

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