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

Last updated by Bigul 1 year, 2 months ago.

Assisted by: Bigul.

Author Posts
September 11, 2023 at 3:39 pm #14377903

Atiq Rahman

Tell us what you are trying to do?

Some of plugin have text <?php echo esc_html($my_pdf_pages_title)?> it should be translatable. But on string section nothing showing to translate. Also placeholder text not showing.

Is there any documentation that you are following?

no

Is there a similar example that we can see?
hidden link visit and check chatbot text all are under esc_html but not able to translate it.

What is the link to your site?
hidden link

I have attached snapshot is ok ? this setting.

Screenshot 2023-09-11 at 7.32.18 PM.png
September 12, 2023 at 9:17 am #14381875

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Welcome to the WPML support forum. We will do our best to help you to resolve the issue.

The following code does not follow the WordPress localization standards. Also, it is handling a dynamic string.

<?php echo esc_html($my_pdf_pages_title)?>

Please refer to the following article for more details.

https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/

https://wpml.org/documentation/support/translating-the-theme-you-created/

So please change the code of the plugin accordingly and scan for the plugin strings.

Or you can use the following WPML hooks for registering and translating the dynamic or custom strings.

https://wpml.org/wpml-hook/wpml_register_single_string/

https://wpml.org/wpml-hook/wpml_translate_single_string/

--
Thanks!

Bigul

September 12, 2023 at 9:22 am #14382013

Atiq Rahman

Hi,

The thing is i can edit third party plugin for support it. But After update plugin it will become same string.

WPML should can read esc_html without change ord register text-domain name.

if you already have this option please mention me i will enabled it.

thank you

September 12, 2023 at 2:43 pm #14384799

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. The best option is you can contact the plugin author and request them to use esc_html_e instead of esc_html.

https://developer.wordpress.org/reference/functions/esc_html_e/

A string domain is a must for proper localization in WordPress. Refer to the following documentation for more details.

https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#basic-strings

https://wpml.org/documentation/support/enabling-text-translation-for-themes-not-compatible-with-wpml/

You can request the plugin author to apply for our compatibility program. It will help us to avoid these types of issues in the future.

https://wpml.org/documentation/support/go-global-program/

--
Thanks!

Bigul