Skip Navigation

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

Problem:
The client encountered an issue where after updating a translation, the shortcode for a Fluent Form reverted to the original language shortcode instead of the translated one. The client had previously translated the shortcode using String Translation and added custom XML configuration and PHP code to make the shortcode translatable, but was unable to find the shortcode in the Advanced Translation Editor (ATE) window.

Solution:
We recommended that when using the WPML editor, the client should search for the form's ID within ATE and manually add the translation for it. Source: https://wpml.org/forums/topic/core-html-block-with-shortcode-not-translateable/#post-14307023/

Additionally, we suggested that if the client is using the Divi builder, they could manually edit the second language page and ensure that the same shortcode/form from the default language page is present, allowing for manual adjustments as needed.

Please note that this solution might not be applicable if it's outdated or not relevant to your specific case. If you're experiencing similar issues and the provided solution does not help, we encourage you to open a new support ticket. We also highly recommend checking the related 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 contact us on the 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 2 voices.

Last updated by Dražen 1 year ago.

Assisted by: Dražen.

Author Posts
February 4, 2024 at 7:45 pm #15263917

viliamM

I have found a strange issue. Hopefully, it will also be reproducible on your end.

I created the page where I put the fluent form via the short code (example [fluentform id="82"]), then I translated the page and via the string translation I entered the english version of the fluent form - [fluentform id="83"].

Everything was working fine, until I have to update the translation - something went wrong with the layout so I have to manually request for the translation - via the Translations menu - when I finish the translation, I found out, that the original string [fluentform id="82"], which I translated via the string translation to [fluentform id="83"] was again returned back to [fluentform id="82"].

This is not very convenient, because I when I forgot it, incorrect version of the form is displayed.

February 5, 2024 at 8:15 am #15264479

Dražen
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps or if I can help with the issue quickly.

This is expected as you should not translate page or update page content via WPML String translation, you should use the WPML translation editor, or if you wish to have different content you can disable it and use the manual translation method.

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

Note you should not mix the manual and WPML editor methods, as one will overwrite changes done by the other, you should choose one method and continue to use it.

Regards,
Drazen

February 5, 2024 at 8:27 am #15264519

viliamM

Hi,

I followed the instructions here: https://wpml.org/forums/topic/fluent-forms-translation/

When I translate the page, I cannot see the form code on the page translations - therefore, I have to make the update via the string translation.

If you can add me the form into the translation window via XML string - i can translate the form directly there

February 5, 2024 at 2:24 pm #15266593

Dražen
Supporter

Languages: English (English )

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

Hello,

that is not the recommended method, but you can use the manual method as my colleague and I suggested.

1) Did you try to edit the 2nd page manually via Divi and just change the shortcode there?

2) Otherwise you can add the next XML code (https://wpml.org/forums/topic/core-html-block-with-shortcode-not-translateable/#post-14300405) and custom function and translate shortcode numbers (https://wpml.org/forums/topic/core-html-block-with-shortcode-not-translateable/#post-14307023)

Let me know how it goes.

Regards,
Drazen

February 5, 2024 at 4:45 pm #15267556

viliamM

1) I have added the shortcode via the String Translation and save it.

2) I have followed the suggested steps:

2) Added the XML:

<wpml-config>
<shortcodes>
<shortcode>
<tag>fluentform</tag>
<attributes>
<attribute>id</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

2A) and also added into PHP snippets the following code

add_filter( 'wpml_tm_job_field_is_translatable', '__return_true' );

See the screenshots.

But I cannot find the shortcode in the ATE window
I even try to search for it - but cannot find it

2024-02-05_17-44-44.png
2024-02-05_17-43-16.png
2024-02-05_17-41-27.png
February 5, 2024 at 5:07 pm #15267693

viliamM

I have made some progress.
Originally, I stored the shortcodes in the code block module. I read this post again - https://wpml.org/forums/topic/core-html-block-with-shortcode-not-translateable/#post-14300405 and found that the supporter is mentioning the text (HTML) block.
So I replaced the code block with a text block

I still cannot find the shortcode - then I tried to search for it - but nothing.

Then I just entered the ID - because it was in the XML code - and I was able to find it.
It is not very practical - as I need to remember that there is some fluent form on the page - and then I need to know its ID.

Would it be possible to display this ID directly on the page without the need to search for it manually?

I am just uploading the image where you can see the string with ID - I also tried to put there the translated form, and it was working fine.

Now, need to display this line directly on the translation page.

2024-02-05_17-41-27.png
February 6, 2024 at 7:38 am #15269136

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for getting back.

Yes, that is the way when you want to translate it via the WPML editor, and you explained the procedure correctly, there is no other way when using WPML editor. You need to search for ID and add translation for it in ATE.

As for showing the form directly on the page, as I have said before and my colleague in shared ticket, you can edit your 2nd page manually via Divi, and the same shortcode/form should be there as in your default language page and then you can make changes manually. I think this is what you are looking for.

Hope this helps.

Regards,
Drazen

February 8, 2024 at 2:55 pm #15281861

viliamM

ok, thank you for your help