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.

This topic contains 7 replies, has 2 voices.

Last updated by Itamar 4 months, 2 weeks ago.

Assigned support staff: Itamar.

Author Posts
June 4, 2019 at 2:34 pm #3952769

danielN-39

I am trying to: Translate wc_product_addons_strings Strings.

Link to a page where the issue can be seen: hidden link (it's a private product so you cant see it) If you want to see it, please contact me.

I expected to see: I translated "2650_addon_multiple_choice_0_name" It's the title of required multiple choice options. If I select one of the options on the product page I get the error "

Instead, I got: "The field is a rquired field".

Example: the title is "test". I translate it into "Test_de". So the system checks if the field "test" is choosen. But there is no field "test" anymore".

Screenshot: Product Page with error: hidden link

Screenshot StringTranslation WPML: hidden link

Thanks

June 4, 2019 at 7:46 pm #3954981

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Are those Global Add-ons that you are trying to translate?
Can you please explain to me step by step how I can replicate this issue?
I'll then try to see if I can see the same problem on my test site.

Thanks,
Itamar.

June 4, 2019 at 9:21 pm #3955371

danielN-39

Hi Itamar,

thank you for helping me. Yes, here are the steps:

1. Install this official Woocommerce plugin: https://woocommerce.com/products/product-add-ons/

2. Go to Products/Add-ons and click on Create New

3. Enclosed you'll find a screenshot of what I set up.

The problem is the field "Title" in combination with the selected "Required field".

At this point everything works fine on the product page.

4. Go to WPML/Strin Translation
and translate this title field. In my case it's in the Domain "wc_product_addons_strings" and the name is "2650_addon_multiple_choice_0_name".

5. Now, open one product on the frontend where this add-on is assigned.

My standard Woocommerce language is English.

So if I open the englisch version and select one of the options and click on "ADD TO CART" everthing works correctly.

But if do the same on a different language version (in my case German, Spanish or French) I get an error after pressing "Add to Cart":

Example: "test" is a required field

(I called the title field "test" and translated it into "testde".

Hope this will help you.

Cheers,
Daniel

June 5, 2019 at 3:19 pm #3962279

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Daniel and thank you for the detailed steps.

I'm setting everything to test this on my test site. But I'm confused about one thing.
You wrote: "My standard Woocommerce language is English."
I'm not sure what you mean by that. I can see that the default language of your site is German. So how I should set up my test site, in German as the default language or in English?

Also please test that this is not the source of the problem that you are having.
It looks to me like you are creating the "test" add-on in the German language.

I look forward to your reply!

Itamar.

June 5, 2019 at 6:42 pm #3963485

danielN-39

Hi Itamar,

sorry. No, my standard language is German but the standard language of Woocommerce is English. So when I set up a this addon I start with English. Later I translate it in WPML in German.

But this is not important, I think. Just work with two languages and translate this title field. Switch in the frontend to the translated language and you will see the problem.

If you need more details, feel free to contact me.

Thanks a lot
Daniel

June 6, 2019 at 6:41 pm #3971599

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Daniel.

In this case, I think that you might need to switch the "wc_product_addons_strings" strings to the German language. When you are on the String Translation section, you will see that you have an option to select the strings and switch their language by pressing the 'Change the language of selected strings' button at the bottom of the strings table.

Nevertheless, when I follow the steps that you give me (even without switching the language of the strings), I can not replicate the problem that you are having. I think that there is another factor or configuration that we are missing. To test this issue, I've created a fresh WordPress installation with WPML and WooCommerce. I've set WPML to have German as the default language and English and French as the other languages. But even when I follow the steps that you gave me, I can add products to the cart in the English language. Please see if you can replicate the issue on my test site. Maybe you will notice some settings that need to be set in order to be able to replicate this issue. You can access the test site through this link:
hidden link
Through this link, you will be automatically logged in. (If nobody logs in the test site will be available for one week from today.)
Could you please see if the issue is replicable on this test WordPress installation?

Thanks,
Itamar.

June 6, 2019 at 9:30 pm #3972257

danielN-39

Hello Itamar,

first of all thank you so much for your time and your great support. I checked everything in your config and couldn't find big differences. So I installed a DEV Site of mine to test different things out. First, I changed the theme from Woodmart to DIVI. On Divi everything worked fine. So it was clear that Woodmart is the problem. I found out that the "AJAX Add to cart" function is the problem. So I changed to "Sticky add to cart" and now it works.

I am sorry that I did steal your time. Next time, I will do the Theme-Check first.

Thanks a lot
Daniel

June 6, 2019 at 9:33 pm #3972259

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Great Daniel, I'm glad that it is solved now!

Can you please mark this ticket as resolved?

Thanks,
Itamar.