This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was trying to enable the Polish translation for WooCommerce by following a guide and uploading the .mo file to the
/languages/woocommerce
directory, but the strings remained in English.
Solution:
We found that the translation should load automatically from WooCommerce. However, there is a known issue where translations do not load when using the block cart and block checkout if
WP_PLUGIN_DIR
and
WP_PLUGIN_URL
are defined in
wp-config.php
. To work around this problem, we recommend:
1. Using the
[woocommerce_cart]
shortcode on the cart page instead of blocks.
2. Removing the
WP_PLUGIN_DIR
and
WP_PLUGIN_URL
definitions from
wp-config.php
and using the standard plugins folder.
Please note that this solution might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket.
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.
Related documentation:
This topic contains 14 replies, has 2 voices.
Last updated by Dražen Duvnjak 2 months, 4 weeks ago.
Assisted by: Dražen Duvnjak.
Author | Posts |
---|---|
February 9, 2024 at 10:12 am | |
Sergio |
I am following this guide: hidden link I downloaded the .mo Polish translation file according to the instructions and I put it in the /languages/woocommerce folder. How can I enable this .mo file to have woocommerce translated in Polish? The guide says "6/ Upload to your site under wp-content/languages/woocommerce/. Once uploaded, this translation file may be used." |
February 9, 2024 at 11:39 am | |
February 12, 2024 at 8:42 am #15291302 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, can you please share the steps or URL where I can see the strings not translated? I checked for example cart page and can see these strings are coming from the page builder nad need to be translated when translating the page. Also, it could be some of the strings are coming from your theme WC templates not WC plugin. Let me know. Regards, |
February 12, 2024 at 8:47 am #15291322 | |
Sergio |
Hello, thank you for your reply. Here you can see the strings that should be translated by the .mo file but are not. hidden link hidden link |
February 12, 2024 at 1:40 pm #15293430 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, I checked further and downloaded the PO file instead MO file as instructed in the shared guide. I have then gone to WPML String translation and imported translation there (option to import at bottom of page). Strings are now imported and translated but still not showing correctly on the frontend, before checking further please let me know if it is okay for me to disable all other plugins and switch themes on the shared website or if you can provide a staging site where we can check further. Thanks, |
February 12, 2024 at 1:43 pm #15293451 | |
Sergio |
Hello, yes, you can disable temporarily the plugins (it was already done via chat). Please note to turn back on the same plugins. The plugin that have to stay off are: The rest needs to be ON as soon as possible, because the frontend will change when the plugins are off and can damage the rankings. The page is visited by google bots very often. If 15-20 minutes is too short for troubleshooting, please feel free to create a staging environment. |
February 12, 2024 at 2:36 pm #15293666 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks, I will take a copy and deploy it on our side so I can check the issue safely further. I will update you after this process. Regards, |
February 13, 2024 at 9:02 am #15296093 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks for the patience. I have escalated this case to our 2nd tier for further checkup. Regards, |
February 14, 2024 at 2:06 pm #15302862 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, our 2nd tier is still working on this case still, and would need your permission to install a few plugins and inspect DB on your live website. We will be careful, please let us know if that is okay to do. Please make a backup just in case. Regards, |
February 14, 2024 at 2:08 pm #15302865 | |
Sergio |
Permission granted. |
February 14, 2024 at 2:13 pm #15302891 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks, forwarding it to 2nd tier support. Regards, |
February 15, 2024 at 7:18 am #15305126 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks, 2nd tier found the problem and I am sharing a summary: - Translation should load from WC automatically. - Due to a bug in WC or WP when WP_PLUGIN_DIR and WP_PLUGIN_URL is defined translation is not loaded only when using block cart and block checkout. We will report it. - For a workaround, either use the [woocommerce_cart] shortcode in the cart page instead of blocks or remove the WP_PLUGIN_DIR and WP_PLUGIN_URL from wp-config.php and use the standard plugins folder for plugins. Regards, |
February 15, 2024 at 7:43 am #15305284 | |
Sergio |
Thank you, I'll do this way. Will you share the reported bug here, so that I can check its progress? |
February 15, 2024 at 8:43 am #15305535 | |
Dražen Duvnjak Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+02:00) |
Hello, thanks. We will first report this internally and try to see if it can be fixed internally from our side, if not we will contact WooCommerce developers. If you wish for an update you can come back in a few weeks and we will be glad to share it with you. Regards, |
February 15, 2024 at 7:34 pm #15309304 | |
Sergio |
Hi, today I noticed that something got broken during one of your test. Probably during the initial chat with WPML support. 1) I just published an article in PL language. This is the link of the blog loop: hidden link 2) I tried to see and enter into page edit mode hidden link but I get a popup "Warning: You are trying to edit a translation using the standard WordPress editor but your site is configured to use the WPML Translation Editor.". I never did that before. I have always used normal "wp" pages for translation. Not automatic ways or translator editor. I didn't click any buttons here to avoid further problems, but I see the page title is in PL language... so why it is showing in English? Can you please fix what was changed in the last few days? New threads created by Dražen Duvnjak and linked to this one are listed below: https://wpml.org/forums/topic/split-many-texts-that-were-translated-before/ https://wpml.org/forums/topic/split-i-tried-to-see-and-enter-into-page-edit-mode/ |
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.