This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer was unable to find and translate hardcoded text from their homepage using WPML’s String Translation feature, even after scanning the theme and plugins. They also experienced an issue where fonts were not loading correctly in the WPML admin panel, but they were advised to open a separate ticket for that.
Solution:
1. We first suggested enabling Auto Register in WPML > String Translation and refreshing the front end to check if the missing text appears for translation.
2. We explained that hardcoded text must be wrapped in translation functions such as __() or _e() with a proper textdomain so WPML can register and allow translating it via String Translation. More details on this process are available in our updated guide: Translate WordPress Themes and Plugins with AI
3. The customer later asked how to make the FAQ section translatable. Mihai explained that:
- The FAQ title should be wrapped in "__()" or "_e()".
- The FAQ questions needed to be registered as translatable strings using "apply_filters('wpml_translate_single_string', $question, 'FAQ', 'FAQ Question ' . $count);"
- The FAQ answers should be registered the same way if they are stored dynamically.
4. We also advised scanning WPML > Theme and Plugin Localization if the strings still didn’t appear.
5. Finally, we noted that implementing these solutions requires custom work, which falls outside WPML’s support policy, but we provided guidance to help the customer move forward.
Relevant Documentation:
- Finding strings that don’t appear on the String Translation page
- WPML String Translation Guide
- We also maintain a dedicated developer guide on preparing and translating plugin/themes for translation. Following these best practices ensures that end users of themes and plugins don’t encounter missing or untranslated strings.
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.
This topic contains 5 replies, has 1 voice.
Last updated by 10 months ago.
Assisted by: Mihai Apetrei.