[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.
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?
I didn't make any updates or changes but I assumed that it was the workaround with changing the language to english(unless you re-imported the db) but maybe it wasn't.
Just updating the plugin on the live site didn't change anything.
Then I made a new backup and imported it into the testing site, including Plugins. There it seemed to work correctly. On my local site it works as well after doing a new import but I don't know why. Is there any data that is persistent but gets changed/updated when importing the database or doing a search-replace?
I will do a clean installation with all files on monday again probably and see if it's the same result.
Thank you so much for running these tests and the update. I've informed our 2nd tier team and they will continue troubleshooting. I'll update here as soon as I have more information.
Our 2nd tier team noticed that the wordpress-en_US.l10n.php file is not updated on your site, causing the problem. It seems outdated. Try to rename or delete it in wp-content/languages/wpml/wordpress-en_US.l10n.php, so the wordpress-en_US.mo file will be loaded.