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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Long Nguyen 1 year, 10 months ago.

Assisted by: Long Nguyen.

Author Posts
July 27, 2023 at 2:12 pm #14111559

philippeK

I'm trying to use WP Download Manager with WPML. I upload a file in download manager plugin as "English PDF" and upload the translated file "French PDF".

Download manager generate 2 different Shortcode to add in the page :
English PDF : [wpdm_package id='197']
French PDF : [wpdm_package id='198']

If i translate the page with ATE i can't see the shortcode and ID translation is not automatic.

I tried to add custom xml configuration but i don't succeed.

July 27, 2023 at 3:26 pm #14112067

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

We need to replicate this issue on a fresh WordPress installation. Then if needed, we will escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

I've already configured WPML on this site and installed the Download Manager plugin. The site's default language is English, and the second language is French.

Please create a new Download post in English and translate it into French. Then check if you can replicate the problem.

Please let us know when everything is finished, and you can replicate the problem. One of our supporters will continue to help you with this issue.

July 27, 2023 at 10:49 pm #14113935

philippeK

I've prepared a file in wpdm and its translation in french.
Then created a page with wpdm shortcode for english file.
I tried to translate this page in french but shortcode is not automatically translated nor available to manual translation in ATE.

July 31, 2023 at 3:32 am #14123507

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Philippe,

After adding the custom XML configuration code to WPML > Settings > Custom XML Configuration tab, to register the shortcode for translation. You can go to WPML > String Translation to translate the shortcode ID attribute manually. Please check this screenshot hidden link

By default, the numeric value is not allowed to translate. If you want to translate it in ATE, please add this code to the file functions.php in the theme/child theme folder.

❌ IMPORTANT: Please backup your database and website before proceeding ❌

/**
 * Allow translating numbers
 * @see https://wpml.org/forums/topic/wpbakery-post-grid-element-exclude-from-filter-list-category-reappears
 */
function wpmlsupp_7499_allow_translating_numbers( $is_translatable, $job_translate ) {
    $data = $job_translate['field_data'];
	if ( 'base64' === $job_translate['field_format'] ) {
		$data = base64_decode( $data );
	}
    if ( is_numeric( $data ) ) {
    	return true;
    }
    return $is_translatable;
}
add_filter( 'wpml_tm_job_field_is_translatable', 'wpmlsupp_7499_allow_translating_numbers', 10, 2 );

Then edit the page > Make a small change > Save> Update the translation > Search for the number in ATE. Please check this screenshot hidden link
and read more in the documentation https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Look forward to your reply.
Thanks

The topic ‘[Closed] I'm trying to use WP Download Manager with WPML’ is closed to new replies.