top_en
Log In
Your Bitrix24
Log In
Authorize to enter
your company's Bitrix24.
Log In

Bitrix24Care

Customize phrases used in the website widget

Rating:

You can customize phrases used in the Bitrix24 Website Widget.

Use JavaScript code to do that:

<script>
window.addEventListener('onBitrixLiveChat', function(event)
{
	var widget = event.detail.widget;

	widget.subscribe({
		type: BX.LiveChatWidget.SubscriptionType.configLoaded,
		callback: function() 
		{
			widget.addLocalize({VARIABLE: 'New Text'});				
		}
	});
	
});
</script>

For example, you can customize these variable phrases:

BX_LIVECHAT_ONLINE_LINE_1 – "We are online"
BX_LIVECHAT_ONLINE_LINE_2 – "and ready to help!"
BX_LIVECHAT_LOADING – "Please wait"
BX_LIVECHAT_ERROR_TITLE – "Unfortunately we could not load live chat :("
BX_LIVECHAT_ERROR_DESC – "Please use some other communication tool or try again later."
BX_LIVECHAT_OFFLINE – "One of our representatives will get back to you shortly!"
BX_LIVECHAT_VOTE_BUTTON – "Rate our service"
BX_MESSENGER_TEXTAREA_PLACEHOLDER – "Enter message..."
The full list of variable phrases can be invoked by entering the following command to the browser's Developers Tools console:
console.table(BXLiveChat.__privateMethods__.localize);

You can add new phrases to the code as a string or as an array:

<script>
window.addEventListener('onBitrixLiveChat', function(event)
{
	var widget = event.detail.widget;

	widget.subscribe({type: BX.LiveChatWidget.SubscriptionType.configLoaded,
		callback: function(){widget.addLocalize({BX_LIVECHAT_LOADING: 'Wait, Live Chat is loading'});
			widget.addLocalize({BX_LIVECHAT_ERROR_TITLE: 'Oops, something went wrong'});				
			
			widget.addLocalize({BX_LIVECHAT_VOTE_BUTTON: 'Give us a score!',
				BX_LIVECHAT_OFFLINE: 'Sorry, our agents are sleeping',
				BX_LIVECHAT_ONLINE_LINE_1: 'Our team',
				BX_LIVECHAT_ONLINE_LINE_2: 'is ready to help you',					
				BX_LIVECHAT_ERROR_DESC: 'Chat is down for repairs',
				BX_MESSENGER_TEXTAREA_PLACEHOLDER: 'Type your question',
                    })
		}
	});
});
</script>

How to insert a code

In the Sites section, select a website. Then you need to add a new block.

Scroll down > click Other > HTML code.

Click Edit.

Paste the code > click Save > Publish.

Done! Phrases used in the website widget have been successfully customized!


This helped Thanks :) This didn't help Sorry :(
Could you please tell us why:
It's not what I'm looking for
It's too complicated

Did not find an answer to your question?

Send your question to the Bitrix24Care team
Access to technical support specialists requires commercial plan subscription and is not available to free account users. Free accounts are limited to self-support resources such as product manuals, helpdesk articles, video tutorials, and free webinars. Technical assistance, training, setup, customization and other value added services can also be purchased directly from local Bitrix24 partners