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.

Tagged: 

This topic contains 3 replies, has 1 voice.

Last updated by jean-francoisS-2 1 month ago.

Assisted by: Otto.

Author Posts
May 2, 2025 at 2:40 pm #16990029

jean-francoisS-2

Background of the issue:
I need to translate the labels of my multiple-choice field, but it's not appearing in the string translations. I have tried some code, like this: add_action('gform_pre_render', 'register_multi_choice_strings_with_wpml'); add_action('gform_pre_validation', 'register_multi_choice_strings_with_wpml'); add_action('gform_admin_pre_render', 'register_multi_choice_strings_with_wpml'); function register_multi_choice_strings_with_wpml($form) { foreach ($form['fields'] as &$field) { if ($field->type === 'checkbox') { foreach ($field->choices as &$choice) { do_action('wpml_register_single_string', 'gravityforms', $choice['text'], $choice['text']); } } } return $form; } Link to a page where the issue can be seen: hidden link

Symptoms:
In the fourth page of our form, there's some multiple-choice checkboxes. We see them in French even though we are in English, because we don't see the translation inside of WPML.

Questions:
Why are the multiple-choice field labels not appearing in the string translations?
How can I ensure the labels are translated correctly in WPML?

May 5, 2025 at 7:31 am #16994775

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Can you check this?
https://wpml.org/errata/gravity-forms-image-choice-field-is-not-translated/

And after this send the Form through the translation management again like this:
https://wpml.org/documentation/related-projects/gravity-forms-multilingual/#translate-gravity-forms

and translate these in the translation editor and not within String Translation.

Does it work, do they show in the translation editor after this change?

May 5, 2025 at 1:55 pm #16996597

jean-francoisS-2

Hi,

I did update the plugin's code, but there's no updated translatable field when putting the form into translation management.

Is there some code I can add that will work ? When will this be updated ?

May 6, 2025 at 3:08 pm #17002489

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

Please, make a small change in the form, just to trigger the update.

Then go again to WPML -> Translation Management and see if you find a section for Gravity Forms there, like this:
hidden link

Best Regards,
Otto

May 6, 2025 at 3:34 pm #17002676

jean-francoisS-2

Thank you !