Home›Support›English Support›[Resolved] I need help to force Chaty wordpress plugin welcome message to be translated to spanish
[Resolved] I need help to force Chaty wordpress plugin welcome message to be translated to spanish
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're trying to translate the welcome message of the Chaty WordPress plugin into Spanish and it still appears in English despite being translated, the issue might be due to how the plugin handles text settings. The text and settings for WhatsApp are saved in the database under the option cht_social_whatsapp. In the plugin code, the option name is sometimes not correctly handled, which affects how WPML translates these settings. Solution: We recommend modifying the plugin's code to ensure consistent handling of option names. Here’s how you can do it: 1. Open the file
This change should resolve the translation issue. However, please note that you might need to reapply this fix after each Chaty plugin update unless the plugin author addresses this issue.
If this solution does not apply to your case, or if it seems outdated, we highly 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 the issue persists, 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 force the Chaty WordPress plugin welcome message to be translated to Spanish on my site hidden link. I have already found the string and translated it, but it still appears in English. I am following a step-by-step process to translate the welcome message using WPML plugins. The message that is seen on the frontend is already translated.
Symptoms:
The welcome message of the Chaty plugin remains in English despite being translated to Spanish.
Questions:
How can I translate into spanish the welcome message of Chaty wordpress plugin?
I am checking, but seems it is not possible because this plugins saves all data serialized in database:
a:18:{s:5:"value";s:13:"+503-73085724";s:11:"full_number";s:12:"+50373085724";s:15:"embedded_window";s:3:"yes";s:16:"embedded_message";s:36:"<p>Test - How can I help you EN?</p>";s:15:"is_default_open";s:2:"no";s:17:"wp_popup_headline";s:22:"Let's chat on WhatsApp";s:22:"wp_popup_head_bg_color";s:7:"#4AA485";s:17:"wp_popup_nickname";s:6:"Josué";s:16:"wp_popup_profile";s:0:"";s:17:"input_placeholder";s:21:"Write your message...";s:12:"emoji_picker";s:3:"yes";s:10:"is_desktop";s:7:"checked";s:9:"is_mobile";s:7:"checked";s:8:"bg_color";s:7:"#49E670";s:5:"title";s:8:"WhatsApp";s:10:"new_window";s:1:"1";s:9:"link_type";s:8:"personal";s:16:"use_whatsapp_web";s:3:"yes";}
Please allow me some more time to check further and try to see if there is another way, and I will get back to you tomorrow morning first thing.
Ok Drazen, thank you. I attached two images where I found the message. I hope it helps. One it is form chaty setup page and the other of the frontend page.
Hi Drazen, I have been doing some test with custom XML configuration since appears to be the most effective way to address this particular issue but I could not find the right ID of the welcome message.
I hope that with the experience of your team can achieve it!
Issue is not with XML, string is registered fine, just the original text is saved as serialized data and then injected in JS, which is not really proper way if you wish to be able to translate it, so WPML translation can not be used.
I will consult with our 2nd tier if there is anything more we can do.
thanks for the patience, our 2nd tier gladly checked and helped.
Seem issue is in the plugin code, as there are some mistakes and you should also contact and share this with plugin author to fix it from their side, otherwise you will have to keep applying the change every time Chaty release an update.
The text and settings for WhatsApp are saved in the database under the option cht_social_whatsapp.
In one part of the plugin code, the option name is correctly converted to lowercase before it’s loaded. But later in another function, it’s used without converting it to lowercase.
This doesn’t affect loading the option itself, but it causes a problem with WordPress filters — which WPML uses to translate these settings.
Fix:
- In the file plugins/chaty/includes/class-frontend.php
- Find next code
Hi Drazen, awesome and thank you! Just please guide me, where I can find the code which I have to change? When I inspect the HTML code of the frontend page? COuld you send me an image?