Home›Support›English Support›[Resolved] Can't find strings from WooCommerce Mini Cart block in String Translation
[Resolved] Can't find strings from WooCommerce Mini Cart block in String Translation
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/
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.
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.
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
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.
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?
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.