[Resolved] checkout page is in wrong lamngauge for one language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with translating the checkout page using WPML, specifically when the page is built using WooCommerce blocks. The checkout page displays in the wrong language for Austrian German (de_AT), as WooCommerce currently does not support translation for certain elements in custom languages when using blocks.
Solution: 1. Ensure a full backup of the website is made. 2. If using blocks on the checkout page, replace them with the WooCommerce shortcode:
[woocommerce_checkout]
. 3. Update the translations after changing to the shortcode. 4. This method allows the use of WPML String Translation to handle the translations effectively.
Please note that this solution might be outdated or not applicable to your specific case. If the issue persists, we recommend opening a new support ticket. Additionally, 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. For further assistance, please visit our support forum at 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.
I checked, and it seems that WC lacks some configuration files for Austrian German. Please try this workaround:
- Visit this page hidden link
- Download the .mo file, following this step-by-step: https://woocommerce.com/document/woocommerce-localization/#downloading-translations-from-translate-wordpress-org-manually
- Rename it to "woocommerce-de_AT.mo" (or the correspondent default locale you're using for the Austrian German language)
- Now get access to your website files and go to the wp-content/languages/plugins/ folder
- Paste there the file you just downloaded and renamed
- Go to WPML -> Themes and Plugins localization
- Check the " WPML has detected changed or new MO files" warning, and scan all the files
It should be solved after this. Please give it a try and let us know how it goes. Thank you.
one more.
when i try to edit the page in gutenberg: the page language is set to austrian german BUT the editor itself is in english.. dont know if that helps?
i need this fixed asap because i have to launch the site today...
I apologize for not being able to provide a quick solution yet. I've forwarded your ticket to our developers, so we can find a solution or at least a workaround as soon as possible. I'll let you know.
Hey there. We found a workaround. Please make a full website backup and follow these steps:
1. Go to Pages and open the Checkout page.
2.Slightly edit the field that require translation, for example, add a blank space at the end of it;
3. Do that for all fields that show untranslated in the Austrian Version;
4. Translate the page to Austrian German.
5. Remove the blank space from the original page and save.
Thank you so much for your patience. After further analyzing, we found that in specific custom languages, WooCommerce does not allow the translation of certain elements when the checkout page is built using blocks.
As a workaround, you can substitute the blocks structure with the shortcode one. Simply access the original checkout page and substitute the blocks with the [woocommerce_checkout] shortcode. After that, please update the transaltions.
I tested that in a copy of your website and the solution worked.
Hi,
That's not good. But I don't understand why this isn't working since Austrian German is also German?
Why does it work for Switzerland it is also a custom language (CH_de)
I need to use the new block look... Is there a other workaround to translate the blocks?