Skip Navigation

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

Problem:
The client is trying to translate the block-based cart and checkout pages in WooCommerce while maintaining the new design. However, the Finnish translation is not working, and the pages remain in English, whereas other languages translate without issues.
Solution:
We recommend changing the locale settings to match the translation file. This can be done by navigating to the WPML languages settings page in your WordPress admin area. Here is a step-by-step guide:
1. Go to your WordPress dashboard.
2. Navigate to WPML > Languages.
3. Adjust the locale settings to match your Finnish translation files.
After making these changes, your Finnish translation should work correctly, and you can maintain the new design of the block-based pages.

Please note that this solution might be outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum for further assistance.

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.

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Bruno Kos 2 days, 9 hours ago.

Assisted by: Bruno Kos.

Author Posts
February 3, 2025 at 8:12 am #16661286

jeppeK-2

Background of the issue:
I am trying to translate the block-based cart and checkout pages in WooCommerce, similar to the issue discussed in this thread: https://wpml.org/forums/topic/the-check-out-page-is-only-partly-translated/. I want to maintain the new design of these pages and not revert to the old design.

Symptoms:
Some languages translate fine, but Finnish does not. I expected the page to be translated to Finnish, but it remains in English.

Questions:
How can I translate the block-based cart and checkout pages while keeping the new design?
Why is the Finnish translation not working while other languages are fine?

February 3, 2025 at 1:02 pm #16662778

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

Here is the sandbox:
hidden link

On this sandbox, can you set the checkout and cart through the blocks in the same way it is set in your website? Let's see if Finnish translation will show up, given that they should be translated in hidden link

February 4, 2025 at 8:26 am #16665195

jeppeK-2

The translations work fine in this sandbox. But they do not work in my site, why is that? I have a staging site that I can give you access to.

February 4, 2025 at 9:02 am #16665395

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

Please include WordPress and FTP credentials for the staging site.

I marked your next reply as private so that you can safely add these.

February 5, 2025 at 8:07 am #16669252

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

Can you install https://wordpress.org/plugins/wp-file-manager/?

I'd like to try something - to remove mo/po files from your site and add those from the Sandbox to see if that's where the issue is.

February 5, 2025 at 11:02 am #16670456

jeppeK-2

Done!

February 5, 2025 at 11:42 am #16670666

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

It looks like File Manager will not work, probably blocked by the host as I get HTTP error 500 on hidden link.

Can you provide me with FTP instead?

February 5, 2025 at 11:44 am #16670750

jeppeK-2

Looks like there is another file manager installed which works. Please see hidden link

February 6, 2025 at 7:44 am #16673759

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

If we change locale here hidden link, to match the translation file it works.

hidden link

Would this work for you?

February 7, 2025 at 8:09 am #16678171

jeppeK-2

Perfect, that works! I had no idea. Thank you.

While I have you: I cannot find a way to translate the "sub heading" that I have added below EU VAT number in checkout. The string "Kun for EU-virksomheder. Ellers skal du lade stå tom."

This does not show up in the "translate to english" popup as opposed to other custom text that I add.

Can you see why?

February 10, 2025 at 6:37 am #16685014

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

What is the source of this string?

"Kun for EU-virksomheder. Ellers skal du lade stå tom."

I see it appears like this on hidden link.

I am not able to find it here:

hidden link

In English it shows the same. It doesn't appear either in String Translation or admin strings in WPML.

February 10, 2025 at 7:35 am #16685209

jeppeK-2

It is a custom string that I have added myself in the checkout page (Danish).

Just like the string "Afsendelse samme dag ved bestilling inden kl. 15:00." which works just fine and is able to being translated.

February 10, 2025 at 2:42 pm #16688103

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

That other was was translated here, correct?

And is it added here?
hidden link

I am trying to resave hidden link to reload the translation job, but I see no option to save the page.

Can you restore this functionality?

no saving.png
afse.png
February 11, 2025 at 7:39 am #16690154

jeppeK-2

Very strange that you cannot save the page? Is that the same for all pages / posts?

It works just fine here, I have just saved the page as you can see. I added "1" to the discussed EU vat number text so you can see.

February 11, 2025 at 9:33 am #16690609

Bruno Kos
Supporter

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

Timezone: Europe/Zagreb (GMT+01:00)

I was able to get it working, it was hidden and these options were only visible if I hovered over the top of the page.

The string seems to be showing in translation editor now and the translation works:
hidden link

It was missing XML:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="woocommerce/eu-vat-number" translate="1">
      <key name="description" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Which I added here:
hidden link

based on:

https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/#block-attributes