Skip Navigation

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

Problem:
The client is trying to translate strings from the Mini Cart block.

Solution:
First, we recommend clearing the caches from the site and browser to ensure that the translations are displayed correctly. If the issue persists, we suggest checking the Norwegian translations in the WooCommerce translation files, as WooCommerce is highly localized and the Norwegian translation is nearly complete. You can find it here: https://translate.wordpress.org/projects/wp-plugins/woocommerce/

If certain strings are not found in the String Translation section, follow the guide here: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/ This guide assists in locating strings that are not visible in the String Translation and those that are not yet registered for translation.

If this solution doesn't look relevant, please open a new support ticket here: WPML Support Forum.

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 3 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 4 months ago.

Assisted by: Prosenjit Barman.

Author Posts
January 16, 2024 at 9:23 pm #15192244

sasaB

Tell us what you are trying to do?
Trying to translate strings from Mini Cart block

Is there any documentation that you are following?
WPML documentation, tried scanning all plugins, enabled Auto register strings

Is there a similar example that we can see?

What is the link to your site?
hidden link

January 17, 2024 at 1:18 pm #15195071

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having and will try my best to assist you in this matter.

I have reviewed the Mini cart on your website and noticed that it is correctly translated into the English version. There seem to be no issues with the translation in this version. For a clearer understanding, please refer to this screenshot: hidden link

As the contents appear to be correctly translated, could you please clear the caches from your site and browser and check again?

If the issue still happening, please let me know where/how should I check to see the issue. I will check accordingly and let you know what to do next.

Looking forward to your response.

Best regards,
Prosenjit

January 24, 2024 at 8:54 am #15220447

sasaB

Hello Prosenjit,

thank you for your answer. Sorry if I didn't explain the problem clearly.
The language of the domain of the strings that can't be found in String Translation is English. So if you are looking at English page the strings are OK, but we need translation for Norwegian language. Looking at the screenshot that you sent, strings "(1 item)", "Subtotal", "Shipping, taxes, and discounts calculated at checkout." are part of Mini Cart template part.

Or specifically "(1 item)" is part of Mini-Cart Title Items Counter block:
_n(
'(%d item)',
'(%d items)',
cartItemsCount,
'woo-gutenberg-products-block'
),

other two strings are in Mini-Cart Footer block:
label={ __( 'Subtotal', 'woo-gutenberg-products-block' ) }
description={ __(
'Shipping, taxes, and discounts calculated at checkout.',
'woo-gutenberg-products-block'
) }

These strings are nowhere to be found in String Translation.

January 25, 2024 at 10:50 am #15225597

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing more information about the issue.

From the code you've shared, I can see that the translation support is included for the texts, therefore, you should be able to translate the text to other languages without any problem.

However, I've checked the Norwegian version of the site and noticed that the Mini cart contents are showing correctly translated. Please check this screenshot for a better understanding: hidden link

Are you referring to locating where the Norwegian translations have been added? If so, the translations might have been included in the translation files of WooCommerce. WooCommerce has been localized into many languages and the Norweigian Translation for the WooCommerce is 99% completed. You can check by going here: hidden link

If you're unable to find certain strings in the String translation section, you can also try the instructions mentioned in this guide: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

It most of the time helps in finding the strings that are not visible in the String translation and also the strings that are nor registered yet for translation.

Please let me know the update. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

January 30, 2024 at 8:14 am #15241789

sasaB

Hello Prosenjit,

this is very strange, in time of writing my previous answer strings weren't translated. And since these strings are still not present in String Translation, I presume that the only way to translate them is through .po .mo files. It is possible that translations were updated in between and so that corrects translated strings are now shown.
Are the strings from Blocks/javascript supported by WPML?