Background of the issue:
I'm using 'Auto register strings to translation' option to find strings that I need to translate and can't be found on my plugin by using 'Localization of themes or plugins'. My plugin uses wp_option table to save some values ('ga4acknowledge_text', 'setup_text', 'essential_cookies_text', 'essential_cookies_button_text', 'privacy_url', 'privacy_text', 'terms_url', 'terms_text'), under 'lwp_cookies_settings_options' key. These values are saved on a form (in plugins settings page), and they are written in Portuguese.
Symptoms:
After I found those strings and translated them to English, they work correctly on the frontend. However, if I switch off 'Auto register strings to translation', my strings are not translated anymore and I only see Portuguese strings in the English language.
Questions:
Can I get any help with this issue?
Why do my strings revert to Portuguese when I switch off 'Auto register strings to translation'?
Thank you for contacting WPML support, I’m happy to help you with this issue.
I understand that, after disabling the option "Auto register strings to translation", the translation strings are not displayed in the frontend even they are translated in String Translation.
My plugin uses wp_option table to save some values ('ga4acknowledge_text', 'setup_text', 'essential_cookies_text', 'essential_cookies_button_text', 'privacy_url', 'privacy_text', 'terms_url', 'terms_text')
I put this on my plugin folder, and I stilll cant see the strings to translate... "lwp_cookies_settings_options" is the option where the strings are saved in wp_options table
"lwp_cookies_settings_options" is the option where the strings are saved in wp_options table
You need to add the correct option name to the custom XML configuration code:
<key name="lwp_cookies_settings_options">
the prefix text "lwp_" is missing in your code. If it still doesn't work, please let me know where you setup the text in the admin area and display them in the frontend.
Then I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.
Looking forward to your reply.
Thanks
The topic ‘[Closed] translating plugin’ is closed to new replies.