This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to translate a string within a PHP code snippet using the WPCode Plugin, but cannot find the string to translate it into Vietnamese despite following all documentation. Solution: 1. Navigate to the WPML >> String Translation page. 2. In the 'Auto register strings for translation' section, enable the 'Look for strings while pages are rendered' option. 3. Visit the page on the front end where the string appears. 4. Return to the WPML >> String Translation page and search for the string. 5. Translate the string. 6. After translating, uncheck the auto-registration option. For more detailed instructions, visit the documentation.
If this solution does not resolve your issue or seems outdated, we 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 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.
Background of the issue:
I am trying to translate a string inside of a PHP code snippet for my site hidden link.
I have followed all documentation but cannot find the string to be translated.
The PHP code is inserted via the WPCode Plugin:
<?php
add_action('woocommerce_product_additional_information', 'add_custom_content_to_additional_info'); function add_custom_content_to_additional_info() { _e('
*Image Disclaimer: Due to the digitalization of the image, the display technologies and the lighting, small variations of product color may occur.
', 'insert-headers-and-footers'); }
Symptoms:
The string shows only in English and I cannot find the string to translate it into Vietnamese. I have followed all documentations, scanned themes and plugins but nothing worked so far.
Questions:
What I'm missing that I cannot find the string inside the PHP code snippet using WPML?
Thank you for contacting WPML Support. Could you please follow the below steps and let me know how it goes:
1. Go to the WPML >> String Translation page and in the Auto register strings for translation section, enable the ‘Look for strings while pages are rendered’ option.
2. Re-visit the page on the front end where the string appears.
3. Re-visit the WPML >> String Translation page and search for that string.
4. Translated the string.
5. After translating the string, uncheck the auto-registration option.
I know it's out of your scope, but can you guide me or give me some hints on how I can style this text wrapped on php?
I'm a self-taught web designer and I tried everything but cannot. I'm just trying to give some space above the text I just added on the Additional Information Tab. The text appears really closed to the above line and is difficult to read it.
Appreciate any guidance where to look for it.
Best,
Xavier
New threads created by Noman and linked to this one are listed below:
Sorry for the delay, I was off during the weekend (Friday-Saturday). Glad to hear the hardcoded string translation issue is solved. For hardcoded text style problems, it’s a different issue and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/how-i-can-style-this-text-wrapped-on-php/
If the hardcoded string translation issue is solved, please mark this ticket as resolved and we will continue working on the above ticket for it.