Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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 thread is resolved. Here is a description of the problem and solution.

Problem: The user was not able to import a veitnameese po file for woocommerce. Solution: - woocommerce po file has too many inputs, and the import screen has more than 32000 inputs, you need to increase max_input_vars to a higher value. Relevant Documentation: https://themezly.com/docs/how-to-increase-the-max-input-vars-limit/

This topic contains 11 replies, has 2 voices.

Last updated by jamesR-27 1 month ago.

Assigned support staff: Jamal.

Author Posts
December 7, 2019 at 9:06 am #5086609

jamesR-27

Tell us what you are trying to do?
Translate the entire woocommerce plugin, however the import .po method freezes the page as there are thousands of strings

Is there any documentation that you are following?
Documentation on string translation

Is there a similar example that we can see?

What is the link to your site?
hidden link

December 7, 2019 at 1:03 pm #5087447

Jamal
Supporter

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

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

In the test server, I increased the MaxInputVars in wp-config.php(first lines) to 40000, but it does not appear as so in WPML->Support, it still keeps the value 3000.
But, when I imported the po file, and then validate the selected strings, the string translation was updated, you can check in WPML->String Translation, only a few strings do not have a translation under WooCommerce domain. Around 5800 translations were imported correctly.

Please check the test server and verify if a translation was not imported, or if a value is not correct, and we'll investigate further on that.

Otherwise, please increase MaxInputVars in your server and try again.
hidden link

I'll be waiting for your reply.

Best regards,
Jamal

December 8, 2019 at 2:03 am #5088113

jamesR-27

Hi Jamal, I tried several things:
- Increasing the max input vars on local server and tried to import .po
- Increasing max input vars on live server and tried to import .po
- Tried to use the test server you set up to import .po

All of these had the same results as yesterday and were unsuccessful. I did notice that a large amount of translations were completed on the test server, however I was not able to successfully do this myself.

December 10, 2019 at 3:45 am #5096685

jamesR-27

Hi Jamal, haven't heard back from you yet, has there been any progress into this issue?

December 10, 2019 at 11:12 am #5099077

Jamal
Supporter

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

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

My apologies for the late reply, I do not work on Sundays and Mondays.

I have tried again in the test server, there are 517 strings that were not translated from the WooCommerce domain name, and +5000 were translated. I suppose the remaining strings are not present in your po file.
I can assume that there are no bugs in the import process

Would you like to allow me temporary access to your website to check this import process closely, your next reply will be private to let you share credentials safely.
Please make a backup before sharing the access information.

Best regards,
Jamal

December 12, 2019 at 2:36 pm #5116049

Jamal
Supporter

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

Timezone: Africa/Casablanca (GMT+01:00)

Hello there, thank you. I hope you had a great weekend as well 🙂

I logged in to your website and the max_input_vars is still equal to 3000, we need it to be more than 32892, check the attached image(max-input-vars-for-woocommerce-import.png).
I failed to increase this value using wp-config.php, php.ini, .user.ini, user.ini as described in this article hidden link

I also tried to do it through .htaccess file, but this gives me a 500 error, probably because of the explanation in this answer https://stackoverflow.com/a/10970022

I'll need you to do the following in order to proceed further with the import issue:
- Make a full backup.
- Update WPML plugins to the latest release.
- Ask your hosting provider to set the "max_input_vars" to 35000. Verify the value in WPML->Support, check the attached image(wpml-max-input-vars.png)
- Then perform the import again.

Let me know if that will help or no.

December 13, 2019 at 8:41 am #5121391

jamesR-27

Hey Jamal, my hosting provider set the max vars to 40000, which is confirmed in WPML>support as being correct, however the issue of importing still persists.

December 13, 2019 at 1:19 pm #5123555

Jamal
Supporter

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

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for your collaboration.

It did not work for me too. I'll need to investigate this issue further, would you be ok if I install Duplicator plugin and take a copy of your website for my debugging?

December 14, 2019 at 3:07 am #5127387

jamesR-27

Do whatever you need to do 🙂

December 17, 2019 at 2:26 pm #5147899

Jamal
Supporter

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

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

I took a copy of your website and I was able to load the PO file locally, check this attached image, only some strings are not translated.

As the import has worked in the Sandbox and my local computer, I believe, that the issue is coming from your current server.

A workaround could be to clone your website to another location(locally for example), increase max_input_vars, import the file, if it worked, migrate back your local copy to the server(using a plugin(Duplicator for example)).

Best regards,
Jamal

December 19, 2019 at 1:06 am #5159017

jamesR-27

Hey Jamal, good news, with the siteground support were able to successfully run the import on the live server! Thanks again for all your help : )

December 19, 2019 at 1:06 am #5159019

jamesR-27

My issue is resolved now. Thank you!