Problem:
The client is experiencing an issue where strings are only translated when the auto-register strings for translation feature is enabled. They have followed certain documentation and provided code examples from their site.
Solution:
1. We recommend generating .mo files by navigating to WPML > Support > Troubleshooting and clicking on "Show custom MO Files Pre-generation dialog box". It's crucial to back up the database and website before proceeding.
2. If the issue persists, we suggest replacing the custom function
with the gettext function
for outputting the button text. For example:
<?php echo __('Buy Now', 'dt_theme'); ?>
Afterward, scan for strings in the child theme by going to WPML > Theme and plugins localization and translate them.
For more information, please refer to our documentation on enabling text translation for themes not compatible with WPML.
If these steps do not resolve the issue, we recommend contacting one of our certified partners for further assistance. You can find a list of our certified partners here: https://wpml.org/contractors/.
If this solution doesn't look relevant, please open a new support ticket in our support forum.