Skip to content Skip to sidebar

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

plugins/chaty/includes/class-frontend.php

.
2. Locate the code

$value = get_option('cht_social_'.strtolower($name));

3. Replace it with

$value = get_option('cht_social'.$this->widgetNumber.'_'.strtolower($social['slug']));

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.

Tagged: 

This topic contains 8 replies, has 0 voices.

Last updated by idlS 3 weeks, 1 day ago.

Assisted by: Dražen.

Author Posts
October 14, 2025 at 1:11 am #17481684

idlS

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?

October 14, 2025 at 5:59 am #17481893

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for contacting us.

Sometimes, depending on how the strings are being added, plugin code might also need adjustment from the plugin author.

I cna take a look and see if there is anything we can do to help from our side.

Please go to the next test site and install mentioned plugin and try to reproduce same issue:

- hidden link

Let me know when you do.

Regards,
Drazen

October 14, 2025 at 1:10 pm #17484058

idlS

Hi Drazen!. Done!

chaty.png
October 14, 2025 at 1:25 pm #17484204

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks.

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.

Regards,
Drazen

October 14, 2025 at 2:19 pm #17484420

idlS

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.

chaty setup.png
chaty on webpage.png
October 15, 2025 at 3:28 am #17485616

idlS

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!

Regards,

October 15, 2025 at 6:13 am #17485672

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

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.

I will update soon.

Regards,
Drazen

October 15, 2025 at 11:19 am #17486716

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

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

$value = get_option('cht_social_'.strtolower($name));

- Replace with

$value  = get_option('cht_social'.$this->widgetNumber.'_'.strtolower($social['slug']));

I tested on sandbox test site and it works fine.

Regards,
Drazen

October 15, 2025 at 1:41 pm #17487207

idlS

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?

Regards,

October 15, 2025 at 3:55 pm #17487695

idlS

Hi Drazen, I did it and worked perfectly! I appreciate the support!

Regards,