Skip Navigation

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.

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."
I did it... but strings are still in English.

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,
Drazen

Screenshot_1.jpg
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
Ie: shipping, total, product, proceed to checkout, including, taxes, remove item, cart totals

hidden link
Contact information, We'll use this email to send you details and updates about your order., Order summary, Add a note to your order, etc

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,
Drazen

February 12, 2024 at 1:43 pm #15293451

Sergio

Hello,

yes, you can disable temporarily the plugins (it was already done via chat).
But please do not leave them off more than 15-20 minutes.

Please note to turn back on the same plugins.

The plugin that have to stay off are:
Cherry Plugin (the older one)
Enable jQuery Migrate Helper
Google Listings and Ads
Instant Images
Jetpack
Merge + Minify + Refresh
Pinterest
Regenerate Thumbnails
Wordfence Security
WP Realiable Cookie Bar
WP STAGING WordPress Backup Plugin - Backup Duplicator & Migration
WP Super Cache

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,
Drazen

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,
Drazen

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,
Drazen

February 14, 2024 at 2:08 pm #15302865

Sergio

Permission granted.
Please make a full backup before.
When the additional plugins are not needed anymore, please remove them.

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,
Drazen

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,
Drazen

February 15, 2024 at 7:43 am #15305284

Sergio

Thank you, I'll do this way.
However I hope it is a temporary workaround.

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,
Drazen

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
I see many texts that were translated before, are not translated anymore. For example "Articles" in the top. "Pages" in the sidebar", the "newsletter" box in the footer, the "Read more" buttons. They were in Polish until few days ago. Now they are in English.

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?

Sergio confirmed that the issue was resolved on 2024-02-16 07:37:56.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.