Skip Navigation

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.

This topic contains 4 replies, has 3 voices.

Last updated by isabelleP-6 4 years, 8 months ago.

Assisted by: Riffaz.

Author Posts
May 27, 2020 at 1:00 am #6223995

simonC-28

Hi,

I am trying to change the hello text from the messenger plugin. I have a website in French and English and I would like to have
Hi how can we help you? (in English) and
Ia ora na, comment peut-on vous aider ?( in French)

I found this help on the forum : https://wpml.org/forums/topic/problem-with-wp-chatbot-plugin/ but it didn't work out for me.

I would greatly appreciate your help on this.

Capture d’écran 2020-05-26 à 14.58.13.png
May 27, 2020 at 6:20 am #6226029

Riffaz

Hi,

Thank you for contacting WPML support.

https://wpml.org/forums/topic/problem-with-wp-chatbot-plugin/ is for WP Chatbot plugin but you are using Messenger Customer Chat by Facebook.

Where do you add this "Hi! how can we help you? " in the backend?
Are you adding this in any plugin options fields?
Please show a screenshot.

Please let me know.

Regards,
Riffaz.

May 27, 2020 at 6:41 pm #6232189

simonC-28

Hi Riffaz,

I used the Messenger Customer Chat plugin. I added the text from the backend but it opens a window and loads Facebook settings. I can select a default language but I can't add a translation. I can switch to another plugin if needed. I saw there is also the function to add hello text from woocommerce. Let me know if it works best with this one for the translation.

Capture d’écran 2020-05-27 à 08.40.03.png
Capture d’écran 2020-05-27 à 08.37.34.png
May 28, 2020 at 3:57 am #6235265

Riffaz

Hi,

So you are adding this in Facebook. Not in you site.
WPML works in your site. not in the facebook.
So technically, translating this is impossible.

In this case, you can use another plugin that compatible with WPML.
You can check here: https://wpml.org/account/downloads/ for a list of compatible plugins.
Just type "chat" in the search field and you will get the list.

Let me know if you need anything else regarding this.

Regards,

August 14, 2020 at 10:04 am #6802069

isabelleP-6

Hi,

I've added the following code to the function fbmcc_inject_messenger() of facebook-messenger-customer-chat.php and it works fine:

    if( get_option( 'fbmcc_pageID' ) != '' ) {
		$genCode = "";
		$the_tags = array(
			"fr" 	=> 	array("fr_FR","Bonjour, Comment pouvons-nous vous aider ?"),
			"en" 	=> 	array("en_US","Hi, How can we help you ?"),
			"es" 	=> 	array("es_ES","Hola, ¿cómo podemos ayudarte?"),
			"nl" 	=> 	array("nl_NL","Hallo, hoe kunnen we je helpen?"),
			"de" 	=> 	array("de_DE","Hallo, wie können wir Ihnen helfen?")
		);
	
		$cur_lang = ICL_LANGUAGE_CODE;
			
		$genCode = "
<div id='fb-root'></div>
<script> (function(d, s, id) { 
	var js, fjs = d.getElementsByTagName(s)[0]; 
	js = d.createElement(s);
	js.id = id;
	js.src = '<em><u>hidden link</u></em>".$the_tags[$cur_lang][0]."/sdk/xfbml.customerchat.js#xfbml=1&version=v6.0&autoLogAppEvents=1';
	fjs.parentNode.insertBefore(js, fjs); 
	} (document, 'script', 'facebook-jssdk')); 
</script> 
<div class='fb-customerchat' 
	attribution='wordpress' 
	attribution_version='1.7'
	page_id='[my_page_ID]'
	theme_color='#whatever_you_want' 
	greeting_dialog_display='hide'
	logged_in_greeting='".$the_tags[$cur_lang][1]."'
	logged_out_greeting='".$the_tags[$cur_lang][1]."'>
</div>
";