We have a problem with String translations. When we use a custom string domain on some custom templates (pages, posts...), some translations of strings in random languages disappear from the front end. However, when we check the string translations, the translations are still there, but they are not showing on the front end. The issue can be fixed by saving the affected string translation again. Usually, multiple string translations disappear from the front end and revert to the default English language. However, when we save just one string translation from the same domain, it fixes all the missing translations that are part of that custom string domain.
We are unable to identify what is causing this problem, as it happens randomly without any specific pattern. I have tried to replicate the issue by adding new translations, removing them, and adding new strings to translate in that domain, but I have had no luck in reproducing it. Currently, we don't have any problematic strings, but they might appear again soon. Do you have any idea what could be causing this issue?
I suspect it might be a conflict in how the string translations are being saved to the database, possibly due to our large database size, which is causing it to stop working for custom strings.
This sounds a strange problem while I believe if you are using proper text domains and gettext calls, it shouldn't happen.
However, assuming that this is happening in your custom theme, I'll recommend trying to set these domains in WPML -> Theme and plugins localization -> Theme and plugins localization -> Automatically load the theme's .mo file using 'load_textdomain' option (see attached).
Also make sure these strings are "included in string translation" via "Translate text in admin screen" (hidden link), in case if these appear in admin texts.
Please let me know if this helps.
Regards.
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.