Multilanguage settings

Learn more about how to make Dashly multilingual for your website

Dashly allows to translate any system message on your website via changing service installation code. Here is an example of modified code:


1. Config object with changed parameters

2. Your API key (which is individual for each account, you can find it in the "Settings - Developers" section) 

3. "Config" object must be added next to dashly.connect  method

Here is an example of code for translating service messages to any language. 

This code will work if language on your website reflects in url this way - 

example.com/en/

example.com/de/

Replace /en/ condition with your own and add your individual API key. 

{
 "thanks": "Thank you",
 "dialogs_history": "Conversation history",
 "new_message": "New message",
 "powered_by": "Powered by",
 "powered_by_try": "Try",
 "powered_by_self": "",
 "enter_message": "Type your message...",
 "dialogs_zerodata": "There are no conversations yet.<br>We've never talked before",
 "enter_email": "Enter your email",
 "enter_phone": "Enter phone number",
 "leave_email": "You can leave your email and we'll continue this conversation through email:",
 "page_title_new_message": "New message",
 "privacy_policy": "Privacy Policy",
 "errorFileType": "Unacceptable file format for upload. You can upload files: jpg, jpeg, png, gif, txt, pdf, rar, zip, html, csv, docx, doc, xlsx, xls, sig.",
 "errorFileSize": "File is too big <br/> Maximum file size – 10 MB.",
 "error": "Something went wrong <br/> There was an error during the upload. Try it one more time.",
 "errorManyRequests": "'To many files <br/> You're sending files too often. You need to wait for a bit.'",
 "errorReplyTooBig": "Message cannot be longer than 20000 characters",
 "errorUserBan": "You are blocked <br/> You are not allowed to write new messages in   the chat",
 "history_section_actual": "Actual",
 "history_section_archive": "History",
 "close": "Close",
 "button_start_message": "Message",
 "button_start_message_wide": "Write in a chat",
 "button_vk": "VK",
 "button_viber": "Viber",
 "button_telegram": "Telegram",
 "button_facebook": "Facebook",
 "button_instagram": "Instagram",
 "button_whatsapp": "WhatsApp",
 "button_title_vk": "Contact us on VK",
 "button_title_viber": "Contact us on Viber",
 "button_title_telegram": "Contact us on Telegram",
 "button_title_facebook": "Contact us on Facebook",
 "button_title_instagram": "Contact us on Instagram",
 "button_title_whatsapp": "Contact us on WhatsApp",
 "social_network_page_title": "How to start a chat in {{networkName}}",
 "social_network_page_desc_vk": ["Open VK using the button below to go to the necessary chat", Type and send us your message"],
 "social_network_page_desc_viber": ["Open Facebook using the button below to go to the necessary chat", "Type and send us your message"],
 "social_network_page_desc_telegram": ["Open Telegram using the button below to go to the necessary chat", "Click the «Start» in Telegram", "Type and send us your message"],
 "social_network_page_desc_facebook": ["Open Facebook using the button below to go to the necessary chat", "Click the «Start» button in Facebook", "Type and send us your message"],
 "social_network_page_desc_instagram": ["Open Instagram using the button below to go to our profile", Click the «Message» button in Instagram", "Type and send us your message"],
 "social_network_page_desc_whatsapp": ["Open WhatsApp using the button below to go to the necessary chat", Send us a pre-filled message", "Type and send us your message"],
 "social_network_page_open_button": "Open {{networkName}}",
 "social_network_qr_code_title": "Scan this QR-code to open<br>{{networkName}} from another device",
 "bumperText": "We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. By using this site or clicking I agree, you consent to our use of cookies. You can read our policy <a href=\"{{privacy-policy-link}}\" target=\"_blank\">here</a>.",
"bumperButton": "I agree",
 "confirmSubscriptionWithCheckbox": "I agree <a href=\"{{subscription-policy}}\" target=\"_blank\">with terms of service</a>",
 "confirmSubscriptionWithoutCheckbox": "By pressing this button you agree with <a href=\"{{subscription-policy}}\" target=\"_blank\">Terms and Policies</a>",
 "appeal": "You",
 "vote_comment": "What happened?",
 "vote_text": "Please rate the operator",
 "vote_thanks": "Thank you for rating!",
 "cart_button": "Go to item",
 "cart_no_name": "No name",
 "cart_zero": "Failed to upload cart items",
 "article_link": "Read the article",
 "to_knowledge_base": "Visit our knowledge base",
 "notification_enter_message": "Type your message…",
 "notification_message_sending": "Message is sending…",
 "notification_message_sent": "Message is sent",
 "notification_file_sending": "File is uploading…",
 "notification_file_sent": "File is sent",
 "notification_typing_status": "typing",
 "history_zero_data_title": "We haven't chatted yet",
 "history_zero_data_desc": "Here will be the history of your conversations",
 "back_to_chat": "Go back to the chat",
 "dateMonth": {
 "0": "January",
 "1": "February",
 "2": "March",
 "3": "April",
 "4": "May",
 "5": "June",
 "6": "July",
 "7": "August",
 "8": "September",
 "9": "October",
 "10": "November",
 "11": "December"
},
 "at": "at",
 "edited": "Edited",
 "removed": "Deleted",
 "removedMessage": "This message was deleted",
 "bot_answer_placeholder": "Type a reply",
 "bot_buttons_placeholder": "Choose a reply option", 
 "connection_problem_toast": "<b>No connection with chat.</b> We will try to           reconnect.",
 "input_error_email": "Please enter a valid email",
 "input_error_phone": "Please enter a valid phone number",
 "popup_close_all_button": "Hide all",
 "offline": "offline",
 "online": "online",
 "whatsapp_auth_text": "By sending this message you will transfer your web chat ID: {{userId}} here in Whatsapp, by editing or deleting this message you will create a new chat and communicate to another agent.",
 "popup_desc": "Popup",
 "image_desc": "Image",
 "emoji_search_placeholder": "Search",
 "emoji_zero_data": "Nothing found",
 "emoji_category_people": "Smileys & People",
 "emoji_category_nature": "Animals & Nature",
 "emoji_category_food": "Food & Drinks",
 "emoji_category_activity": "Activity",
 "emoji_category_places": "Travel & Places",
 "emoji_category_objects": "Objects",
 "emoji_category_symbols": "Symbols",
 "emoji_category_flags": "Flags"
}

In case the language changes the domain itself -

example.com

example.de

Please replace this line from the previous example 

if (location.href.indexOf('/en/') > -1) {  

with this one

if (location.host.split('.').indexOf('com')>-1) {

Note that instead of 'com' you should add your own value.

You can find more parameters to configure with the "settings" argument in our article about Additional chat settings

Powered by