Skip to content Skip to sidebar

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 1 reply, has 0 voices.

Last updated by Otto 1 week, 1 day ago.

Assisted by: Otto.

Author Posts
November 19, 2025 at 1:52 pm #17592081

alexandreP-37

Background of the issue:
I am trying to translate a string that includes a percentage symbol (%) using WPML's auto string translation feature. Since I use sprintf to add HTML tags to the string, I escape them as %%. Here is the code I am using: <code> <p class="text-white text-center md:!text-left"> <?php $coupon_code = 'BLACKFRIDAY2025'; /* translators: 1: opening <span>, 2: coupon code, 3: closing </span>, 4: expiry date. */ echo sprintf( __( 'Get 30%% off yearly ASO Intelligence (Essential & Grow) & yearly App Reviews Manager plans. Apply code %1$s%2$s%3$s at checkout. Valid until %4$s.', 'apptweak-pricing' ), '<span class="font-bold">', esc_html($coupon_code), '</span>', esc_html__('December 5, 2025', 'apptweak-pricing') ); ?> </p> </code> The issue can be seen on this page: hidden link.

Symptoms:
The translated string in Korean shows '30%' instead of '30%%', which breaks the theme as sprintf uses '%' as a placeholder.

Questions:
None, i am reporting a bug.
I solved it by manually editing the Korean translation and adding the extra %.

November 19, 2025 at 7:41 pm #17593406

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for reporting this. I managed to reproduce the issue and escalated the problem to our second tier support. I'll keep you posted.

Best Regards,
Otto