Skip Navigation

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

Problem:
The client needed to maintain the values of a country field in a form in the original Dutch language, despite automatic translations. After manually correcting the values to Dutch and adding a new field, the values were automatically translated again.
Solution:
We recommended the following steps:
1. Edit the "wp-content/plugins/gravityforms-multilingual/inc/gfml-tm-api.class.php" file
2. Replace the following line 212

if ( isset( $choice['value'] ) ) {

With

if ( isset( $choice['value'] ) && $form_field->enableChoiceValue == true ) {

3. Make a change to the form and update it.
4. Navigate to WPML-> Translation Management.
5. Send the form to translation.
6. Check the translation editor.

If this solution does not apply to your situation because it might be outdated or not relevant to your case, we suggest opening a new support ticket. We also highly recommend checking 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 in the WPML support forum.

100% of people find this useful.

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.

Our next available supporter will start replying to tickets in about 11.68 hours from now. Thank you for your understanding.

This topic contains 10 replies, has 2 voices.

Last updated by Osama Mersal 1 month ago.

Assisted by: Osama Mersal.

Author Posts
March 21, 2024 at 2:49 pm #15436939

ateB

I created forms with a country field. This form has some conditional logic with email routing, so I need to keep the values of the country field in my base language (Dutch).

With the automatic translation, all the labels and values were translated. I manually put all the values back into the original Dutch language.

I then added an extra field to the form and wanted to edit it for all my other languages. But no, the values are again translated!?

March 21, 2024 at 3:35 pm #15437277

Osama Mersal
Supporter

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

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

Hi,

1) Please log in to this sandbox site and try to replicate the issue. (hidden link)

In order to replicate the issue, please create a simple form with the country select field and translate it to reproduce the issue.

If the issue is replicable, please let me know to check and consult our 2nd tier support team.

2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.

Best regards,
Osama

March 22, 2024 at 7:47 am #15438895

ateB

1) This sandbox site does not have automatic translation enabled. I can't replicate my issue on the sandbox. My issue is that when I edit a form it still translates field values. Although I disabled the translation engines.

2) Provided.

Screenshot 2024-03-22 at 08.49.57.png
March 23, 2024 at 2:00 pm #15443197

Osama Mersal
Supporter

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

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

Hi,

I've activated the automatic translation on the sandbox site. Please check if you can replicate the issue. (hidden link)

Thanks for your cooperation

Best regards,
Osama

March 25, 2024 at 9:11 am #15445187

ateB

The issue also occurs in the sandbox. My steps:

1. The form has a country select field and all countries are translated.
2. Edit the form in my other languages (Dutch and German). I reset the values of the countries to the original (English language) and save the form.
3. Now all works fine and email routing is ok.

(Here the problem occurs)
4. Disable the translation engines. So nothing is translated automatically!?
5. Edit the original form and change one of the field labels.
6. Send the form to translation.
7. In the Translation management I select the form and choose 'Translate myself'.
8. In the Translations queue the forms say Needs translation. Click on Translate.
9 The Advanced translation opens. The changed label needs translation, that's good (green marking in screenshot). But the select values are again translated 🙁 (red marking in screenshot)

Screenshot 2024-03-25 at 10.10.38.png
Screenshot 2024-03-25 at 10.10.08.png
March 25, 2024 at 12:34 pm #15446753

Osama Mersal
Supporter

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

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

Hi,

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

Best regard,
Osama

March 26, 2024 at 12:59 pm #15451275

Osama Mersal
Supporter

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

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

Hi,

Thanks for your patience. Please check the following steps:

1- Edit the "wp-content/plugins/gravityforms-multilingual/inc/gfml-tm-api.class.php" file
2- Replace the following line 212

if ( isset( $choice['value'] ) ) {

With

if ( isset( $choice['value'] ) && $choice['value'] !== $choice['text'] ) {

3- Edit the form in the default language, make a minor change, and update it
4- Send it to translation
5- Complete the translation and check the front end

I've applied the above steps to the sandbox site. Please check if it works correctly. (hidden link)

Best regards,
Osama

March 26, 2024 at 8:21 pm #15453073

ateB

I tested on the sandbox and on the website, it seems to work! I see the value field is not in the translation screen anymore (screenshot).

I also enabled the translation engines again, also works fine 🙂

Will this be fixed in an update for the plugin? Can I keep the changed file in my website?

Screenshot 2024-03-26 at 21.20.29.png
March 27, 2024 at 1:36 pm #15455855

Osama Mersal
Supporter

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

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

Hi,

Our dev team is aware of the issue and will check if it needs a permanent fix. In the meantime, please save this workaround and apply it after updating Gravity Forms Multilingual.

Best regards,
Osama

March 28, 2024 at 9:06 am #15459417

ateB

I noticed that when translating an existing form with a country field that it does not work. Is there a workaround for this?

When I duplicate a form it works properly, I bet this is because the form is then re-created.

March 28, 2024 at 12:29 pm #15460545

Osama Mersal
Supporter

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

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

Hi,

Please try the following steps:

1- Replace the previous workaround with the following line:

if ( isset( $choice['value'] ) && $form_field->enableChoiceValue == true ) {

2- Make a change to the form and update it
3- Go to WPML-> Translation Management
4- Send the form to the translation
5- Check the translation editor

Best regards,
Osama

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.