Skip Navigation

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

Problem:
The client is experiencing an issue where the number value shortcode is translated in the Advanced Translation Editor (ATE) but displays the same output in both languages.
Solution:
1. Replace the existing code snippet in your

functions.php

file with the following:

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

2. Make a minor edit to the page in the default language and update its translation.
3. If the issue persists, replace your shortcode:

[convertkit form=7682931]

with:

[convertkit form="7682931"]

and re-translate the page.

If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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 6 replies, has 1 voice.

Last updated by pascalC-17 2 days, 7 hours ago.

Assisted by: Osama Mersal.

Author Posts
February 14, 2025 at 12:39 pm #16706274

pascalC-17

Background of the issue:
I've just had contact with someone from your support staff. They helped clarify and confirm the translation setup in both the custom XML configuration in WPML > Settings and the extra function needed in functions.php. So I got it visible in the ATE and translated it.

Symptoms:
The number value shortcode is translated in ATE but the same output is given in both languages. It seems to not actually translate the number.

Questions:
Why is the output the same when the ATE has different numbers in the shortcode?

February 16, 2025 at 7:22 am #16710128

pascalC-17

Is there a way to log the actual result? Where or how do I see what code is listed on the translated page?

February 16, 2025 at 10:20 am #16710351

Osama Mersal
Supporter

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

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

Hi,

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

First of all, sorry for the late reply; it was due to a higher workload.

Please log in to this hidden link">sandbox site and install the Kit plugin. Then, please try to replicate the issue. If it is replicable, please let me know so I can check it and consult our second-tier support team.

Best regards,
Osama

February 16, 2025 at 11:29 am #16710453

pascalC-17

I've made the same changes I did on my site, it's giving the same problem.

hidden link is still showing the og form with short code: [convertkit form=7682931]

While in the ATE I translated the code 7682931 to 7682990

Which should show this form: hidden link

Hope you can find the issue.

February 16, 2025 at 11:57 am #16710526

Osama Mersal
Supporter

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

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

Hi,

Thanks for replicating the issue. I've consulted our 2nd tier support team, and I'll update you as soon as they reply.

Best regards,
Osama

February 17, 2025 at 9:34 am #16712460

Osama Mersal
Supporter

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

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

Hi,

Please replace the code snippet in functions.php

// WPML ATE shortcode numbers fix
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 );

With this line

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

After that, please make a minor edit to the page in the default language and update its translation. Kindly check the hidden link">translated page on the sandbox site.

Best regards,
Osama

February 17, 2025 at 1:40 pm #16714647

pascalC-17

It doesn't seem to work on my website. I tried multiple times. Is there any other setting that might be different from the sandbox env and my site that might be making this difference?

February 17, 2025 at 1:51 pm #16714763

Osama Mersal
Supporter

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

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

Hi,

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

February 17, 2025 at 3:21 pm #16715291

Osama Mersal
Supporter

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

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

Hi,

Please check the provided access details, as I get the following error. (Error: The username *** is not registered on this site. If you are unsure of your username, try your email address instead.)

Best regards,
Osama

February 17, 2025 at 3:35 pm #16715361

pascalC-17

Sorry about that I, fixed it and tested it you should be able to log in now.
Image links are broken in the staging site but that's not an issue with this I think.

February 17, 2025 at 3:39 pm #16715383

pascalC-17

Actually I see what I did wrong with the staging thing.. I need to re run it to correct it. let me know if I should do that first or after you've had a look.

// edit - no I don't know why it didn't work... Let me know if you'd rather try on the live site

February 17, 2025 at 3:48 pm #16715432

Osama Mersal
Supporter

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

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

Hi,

I changed the language url format and the staging works correctly. I created a test page and translated the ID, but the translated form doesn't appear on the front end. (hidden link)

Please try the following steps on the staging site:

1- Deactivate all the plugins except those active ones on the sandbox.
2- Switch to a WordPress default theme like Twenty Twenty-one.
3- Make a minor edit to the hidden link">WPML TEST page and update its translation.

Best regards,
Osama

February 17, 2025 at 4:07 pm #16715557

pascalC-17

Now it's not showing the shortcode for translation at all.
I have no idea what is going on anymore

February 17, 2025 at 4:16 pm #16715598

Osama Mersal
Supporter

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

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

Hi,

Did you add this line to the current theme functions.php?

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

Best regards,
Osama

February 17, 2025 at 4:49 pm #16715752

pascalC-17

oeps,.. I did now and it showed up. So I put in the other short code from the number,.. but sadly it's not being translated. the text above was translated tho.