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 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 4 replies, has 2 voices.

Last updated by Prosenjit Barman 11 months ago.

Assisted by: Prosenjit Barman.

Author Posts
July 2, 2024 at 3:18 pm #15876513

jimeH

Hi

I have the problem for the GravityForms shortcodes. I have already tried this guide before to help with translating the shortcodes: https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/. They only show up in the string translations and not in the ATE. I have uploaded an image of the XML code we currently use on the site. Maybe you can take a look and see if there is something missing. We have also implemented the following inside the functions.php: https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-id-attributes-translatable

Scherm_afbeelding_2024_07_02_om_14.33.23.png
July 3, 2024 at 7:25 am #15881530

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for contacting WPML Support.

I understand what you're looking for and will try my best to assist you in this matter.

From the screenshot, it appears that the shortcode is registered correctly for translation. However, to view the attribute values in the translation editor, please follow these steps:

1. Make a small change to the page in the WordPress Editor.
2. Proceed to update the translation.
3. When you are in the translation editor, enter the attribute value added to the shortcode in the search box, as shown here.
4. The attribute value should appear in the results.

However, may I ask, what is the purpose of translating the Gravity Form shortcode? If your goal is to display the translated form, please note that by installing the Gravity Forms Multilingual addon on your site, you can easily translate the form into other languages. This way, the translated form will automatically appear on the translated page without needing to manually translate the shortcode or enter the translated form.

For more details about the addon, please check this documentation: https://wpml.org/documentation/related-projects/gravity-forms-multilingual/

Please let me know if the information above helps. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

July 3, 2024 at 8:24 am #15882262

jimeH

Hi, thanks for reaching out.

Every language has a different form with different input fields. That is why we don't use the Gravity Forms Multilingual addon.

We the information you have given me, I do see the ID of the shortcode. I translated the ID to the right form ID via ATE but when I check in on the front-end the wrong form is still showing. Am I doing something wrong?

Scherm­afbeelding 2024-07-03 om 10.22.45.png
Scherm­afbeelding 2024-07-03 om 10.20.59.png
July 3, 2024 at 10:00 am #15883001

jimeH

I saw that there was also a string translation for the shortcode, after changing this, the right form is loaded on the page. However, when making changes in the translations with ATE, the change is undone. In the screenshot you will see the last record of the revision log that shows that the ID is being changed while no user is linked to that action. How is this possible? And more important, how do we fix this?

Scherm­afbeelding 2024-07-03 om 11.59.28.png
July 3, 2024 at 12:06 pm #15883975

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update.

If you want to display a different form for each language, the recommended approach is to translate the Shortcode via String Translation. Since the Form ID changes, it is advisable to remove the code you used to register the Shortcode(in WPML > Settings > Custom XML Configuration) and the code added to translate numbers in the functions.php file.

Once this is done, go to "WPML > String Translation" and search for the default form Shortcode. If it appears in the results, add the Shortcode of the form you want to display in other languages as the translation.

This should ensure that the form appears correctly in each language.

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

The topic ‘[Closed] GravityForms shortcode translation’ is closed to new replies.