This thread is resolved. Here is a description of the problem and solution.
Problem: The client was unable to find new strings added to their theme for translation in WPML after updating the theme. The strings were not showing up in the WPML string translation scan. Solution: We recommended the following steps: 1. Ensure that the strings in the theme's PHP files are correctly formatted without any preceding backslashes in the function calls. 2. Modify the PHP file where the strings are added, specifically removing incorrect syntax or characters that might prevent WPML from recognizing these strings. 3. Rescan the theme for strings via WPML > Theme and plugins localization > Strings in the themes > Scan selected themes for strings. 4. Once the strings appear in the WPML string translation list, proceed with the translation.
If this solution does not resolve your issue, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, 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.
I'm trying to translate new strings that have been added to the theme, but they are not showing up when I run:
Theme and plugins localization > Strings in the themes >
Scan selected themes for strings
Most of the strings are found, however I recently updated the theme and added the following new ones:
\__('Key info', 'granola')
\__('Eligibility Criteria', 'granola')
\__('Frequently Asked Questions', 'granola')
Thank you for contacting us. Could you please inform me where I can find the following items on your website? Kindly provide the URL of the page where I can view them:
- Key information
- Eligibility criteria
- Frequently asked questions
Additionally, please specify where you inserted these items into your theme files.
//List all fields that we want to show in sidebar
$fundlabels = ['value_of_grant', 'applications_open_date', 'applications_close_date'];
$sidebar_content = "";
1. I've installed the file manager plugin as SFTP isn't functioning for me.
2. I've made adjustments to the single-fund.php file. Specifically, on line 35, I've removed the backslash from the code 'heading' => __('Key info', 'granola').
3. I've conducted a scan of the strings, and the amended phrase appears here: hidden link
4. Subsequently, I've translated it, and it appears to be functioning correctly here: hidden link.
That is very strange as strings seem to have been picked up from other files with the prefix \__
However the translations are now working - many thanks!
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.