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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 16 replies, has 1 voice.

Last updated by Kor 17 hours, 23 minutes ago.

Assisted by: Kor.

Author Posts
June 23, 2025 at 12:02 am #17157798

endreK-2

Background of the issue:
I am using Ninja Tables as a price list embedded in Accordion widgets with shortcodes on my site hidden link. I need to modify some text and images in the default Hungarian language and then start WPML synchronization. Previously, I could change shortcodes in WPML String translation, but now I can't find this option in either String translation or ATE.

Symptoms:
Ninja Table shortcodes cannot be translated in ATE, and WPML changes every Ninja Table shortcode to Hungarian shortcodes during synchronization.

Questions:
How can I keep shortcodes unchanged on translated pages during synchronizations?
How can I edit shortcodes during synchronization?

June 23, 2025 at 6:44 am #17158088

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. I will answer this ticket before the ticket is assigned to one of my colleagues.

To make a shortcode compatible with WPML the developer of the shortcode or you need to create proper XML code following the documentation below:

https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/

If it is not an option for you, you can use manual translation on the page that you used the shortcode: (You can not mix and match ATE with manual translation)

https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Thank you.

June 23, 2025 at 10:12 am #17159194

endreK-2

In our case manual translation is NOT OPTION, so I started XML configuration following the first link.
First I have made test page in Hungarian (default WPML languge), using Elementor Pro. This page is including a flex container and shortcode widget.

Shortcode widget contains : [ninja_tables id='4786']
It is OK in Hungarian.

So, I guess, I must register "ninja_tables" shortcode in WPML Custom XML Configuration, so added this code:
<wpml-config>
<shortcodes>
<shortcode>
<tag>ninja_tables</tag>
<attributes>
<attribute>id</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

As this shortcode is ID based, so I added this this lines to functions.php:
/*This code enables WPML to translate numbers (like IDs) by overriding a default setting.*/
add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

After saving all the files I started to translate to czech language. Unfortunetly no shortcode appeared for translation. (see image)
When I search for "shortcode" in ATE Custom fields appeared for translation. I have transleted the the field, changing ninja_tables id to Czeh table id. Saved, "completed the translation. After all, on front, switching to Czeh still Hungarian table is displayed.

see here: hidden link

So please help me how to go on, what to do?

As mentioned, we need WPML sync in ATE, mnaula translation is not good in our case.

WPML custom XML config.jpg
Teszt page Hungarian with Elementor widgets.jpg
ATE screen still no  shortcode.jpg
ATE scree custome fields edited.jpg
June 24, 2025 at 1:01 am #17162734

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for contacting us. You need to add this custom PHP code to allow number translations. Could you please backup and insert the custom PHP code mentioned here https://wpml.org/forums/topic/translating-numbers-2/#post-16201433 into your theme's functions.php file? Then, make minor edits to the primary language page and translate it again to see if the number shows up. Let me know how it goes.

June 24, 2025 at 8:09 am #17163430

endreK-2

Dear Kor,
Thanks for reply.
I have inserted the code into functions,php, than made a small change - header widget added - started Englesh translation.
No shortcode fields appered in ATE.
Serching for number 4786 -which is ID of Ninja Table in Hungarian - Custom Fields appeared. In custom fields I have changed the ID to 25102. Than saved with Completed translation.
At least this method has no effect, on English page still 4786 Ninja Table is displayed.
See attached screenshots.

Let me ask: maybe Elementor Shortcode widget registration problem exists? Not registered for translation?

Please advice...
Endre Kover

Serching for 4786 in ATE.jpg
ID changed in Custom Fields.jpg
WPML ATE after minor change.jpg
Functions.php for WPML.jpg
June 24, 2025 at 8:33 am #17163615

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

June 24, 2025 at 3:00 pm #17165729

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Could you check now? I've switched to the Gutenberg editor and corrected the PHP code. Now, the ID shows up in the advanced translation editor.

Screenshot_26.png
Screenshot_27.png
June 24, 2025 at 4:06 pm #17166165

endreK-2

Well, yes, I see it works for "Tesztoldal-test1" page.
But in our case Elementor Pro is a must, our customer's authors and editors can not use Gutenberg.
So I have made a new page "Tesztoldal- test2" with Sortcode widget including [ninja_tables id='34668'].
Tried to translate to Czeh and English with ATE: no fileds apper. Then writing 34668 in search -> no field appear. If writing "ninja" in search "ninja_tables" is appear.

Please check.

June 24, 2025 at 4:18 pm #17166229

endreK-2

I have made a nother test page it is called:

"TESZT 3 belepojegycsomag"

It is a good example of a producton page. It contains accordion widget with embedded shortcode widgets. On this page there are 5 shortcodes. All shortcodes must chage for every language.
Please try it with Elementor!

June 25, 2025 at 8:55 am #17167811

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. It looks like it's not working if it's inside the elementor editor. Could you replicate the issue on our sandbox site here hidden link so that I can escalate this further to our 2nd Tier Support for further investigation? You can install the required plugins that are needed to replicate the issue.

June 25, 2025 at 4:30 pm #17170341

endreK-2

Dear Kor,
I have built a sample site.
Theme was changed to "Hello Theme".
Elementor (free) and Ninja Tables (free) plugins were installed.
These are used on production site hungarospa.hu

I added "main" page and "Test page for Elementor – WPML" page in English.
I have added Czeh and Hungarian in WPML settings to test translation.
I have editied "Test page for Elementor – WPML" in English with Elementor and I have placed on it regural widgets.
It is very important to note, that during translation

Button text and url should be change to proper langauge link @hungarospa.hu.
Example image should be change for proper languge -see media library images.
pdf icon url should be changed for proper pdf -see pdf files in media library.
In accordion, embedded ninja tables shortcode should be changed for proper table. Se All tables in Ninja Tables.

This test environment very well illustrates our production situation, where we have to change URLs and shortcodes in many widgets (image, button) to display the appropriate language content.

I tried to translate to Hungarian - translation is not shown on front.

June 26, 2025 at 8:15 am #17171882

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I can see that the links and PDF files are appearing in the Advanced Translation Editor and are available for translation, as shown in the attached screenshot. Regarding the issue with the Ninja Forms shortcode translation, I’ll escalate this to our 2nd Tier Support for further assistance.

June 26, 2025 at 9:37 am #17172559

endreK-2

Thanks for feedback!

I have checked, I translated into Hungarian.
Iconfirm, that
- Button translation worked
- PDF icon link translation worked

I could not translated the url of the Image (in classic section I changed the url to hidden link, but i can not be seen on the front).

And waiting for next step, for Ninja Table shortcodes.

Thank you for everything so far!

June 26, 2025 at 5:55 pm #17174932

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I've escalated this and I will come back to you once I've received feedback.

June 29, 2025 at 9:02 pm #17180920

endreK-2

Dear Kor,
The end user needs to update the prices on the hungarospa.hu production website, which means modifying about 320 Ninja Tables.
The work will start on June 30th at 06:00 UTC. We ask You to stop debugging WPML or making any changes on the hungarospa.hu WordPress backend from this time. To avoid misunderstandings and for security reasons, your account will be temporarily disabled from the above time.
When end user job finished I contact You again.
During this period please use only Sendbox.
Endre Kover