[Resolved] Some string translations are only shown in frontend when
This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to translate a string for a WooCommerce Product Taxonomy to other languages, but the translation does not appear on the frontend unless 'Look for strings while pages are rendered' is active. For example, instead of 'Color', 'Farbe' (the original string) is displayed. Solution: We found that the
wordpress-en_US.l10n.php
file in your site's directory might be outdated. We recommend renaming or deleting this file located at
file to be loaded instead, potentially resolving the issue.
If this solution does not work or seems irrelevant due to it being outdated or not applicable to your 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 problem persists, 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.
Thanks for your patience while I continued testing. I ended up going to Products -> Attributes and editing Farbe and changing it to Color. I then added the translations for French and German, and it seems that with the default attribute set in English, it works. Is this an okay workaround for you? If not, I can go back and edit the attribute name and continue troubleshooting.
Since there are not many attributes, it would be easy enough for me to convert the default to English like I did on Color, and then moving forward we suggest creating the attribute in English and translating to French and German. Do you want me to do that? Or do you mean that it is not acceptable to create the attributes in English?
No, not at all, the default language stays the same. Just the attribute label would be created in English and then the main term translated to French and German.
Go to Product -> Attributes and click Gebindegrösse to edit it. Change Gebindegrösse to Container (or whatever you want the term in English to be). Save the changes.
Now go to WPML -> Taxonomy Translation and select Product Container from the drop down and add Gebindegrösse as the German translation.
I confirmed on the link you shared above that this solution resolved it here as well.
Thank you for your solution. I tried it and it worked. I will now go back to the project manager and try to implement it. I'll let you know if it's solved or if we need more help.
Unfortunately, this solution is not good enough for us because there are strings in the backend that don't translate like this: hidden link
We have a different setup that also runs WPML and WooCommerce, but the translations work as intended, so there must be some kind of problem. This may also be a problem for other future sites.
Could you look into other possible solutions? Maybe the problem is a bug and cannot be fixed without code. What do you think?
On the staging site, we updated to WPML String Translation to 3.2.16 and now I am seeing the correct terms on English and French. Did you make any other changes, or did the update resolve the issue?