Skip to main content
Version: 6.18.0

Setting up language localization

Widget Language Localization

You can customize your labels and text to match the widget to your website localization. The package includes localization for all widget labels in the following languages: Russian (ru), English (en), Indonesian (id), Azerbaijani (az). They are included in the widget code. You can add any number of additional locales or override the settings of the existing ones. You manage localizations in the settings.json file. For configuration, specify the label key, the language code, and the value for this language in the settings.json file in the locales branch. In this example, you can see a setting option where some labels have been changed.

Configuration file parameters responsible for localization

You manage the localization settings in the settings.json file.

ParameterData TypeDefaultDescription
localestring"en"Preferred locale – a language code in the ISO 639-1 format
localesJSON object{}Object with keys to define locales. Only the keys and language codes whose values you want to override are specified.

Localization application logic

When setting up localization in settings.json, you can specify a preferred locale. To change the widget locale on the fly, use the setLocale method.

The label locale in the widget is defined using the following logic:

  1. Current locale: the link specified during widget initialization or specified by the locale change method. If the current one is not set, then:
  2. Preferred: the one selected in settings.json. If the preferred locale is not set, then:
  3. Default: the en locale.

Priority of label display:

  1. Redefined (overridden) in the setting.json. If they are not set, then:
  2. Default

Structure of the locales section of the settings.json configuration file

{
"section": {
"subsection": {
"element1": {
"language1": "value for language 1",
"language2": "value for language 2"
}
}
}
}

Description of localization keys

The final value of the key is an object that contains language code: values for language in the properties of the pair (see the structure)

Error texts

KeyDescription
1errors.file.restricted.typeInvalid attachment type error text
2errors.file.restricted.sizeInvalid attachment size error text
3errors.file.restricted.not-foundAttachment not found error text
4errors.file.disallowedDisallowed attachment error text
5errors.file.timeoutAttachment timeout error text
6errors.file.unexpected-errorUnexpected file upload error text

Warning about incomplete browser support

KeyDescription
1BadBrowser.headerPartialChat header. Warning about incomplete browser support

Widget chat area

KeyDescription
1common.time.todayFloating date label (today)
2common.time.yesterdayFloating date label (yesterday)
3common.typingIdentifier that appears when the agent is typing
4RateIndicator.ofThe preposition that is used in the results of the CSI request messages: for example, if "ChatMessage": { "of": "out of" } and the score is 4 out of 5, the message will display "4 out of 5"
5ChatMessage.yourself"You" pronoun in the message header. It shows the client that they are the sender
6ChatMessage.youWrote"You" label
7ChatMessage.operatorWrote"Operator" label
8ChatMessage.audio.compatibilityMessage that appears in case the browser does not support audio content
8SocialLinks.textName of the panel with links to social networks and messengers
9ChatMessage.audio.errorPlaybackAudio file playback error message
10ChatMessage.audio.errorSpeechSpeech recognition error message
11ChatMessage.audio.quoteInfoName of the audio message in quotes
12ChatMessage.downloadErrorError message on saving an attachment
13ChatMessage.sendErrorundefined
15ChatMessage.messageDeletedundefined
16ChatMessage.messageEditedundefined

Widget chat area

Welcome form and feedback form

KeyDescription
1LimitedTextarea.charsFeedback form input field, indicator of the remaining characters to enter: "N character(s)"
2ChatWelcome.sendWelcomeWelcome form: text on the form submission button
3ChatWelcome.identification.pre.textWelcome form: header of the welcome message
4ChatWelcome.identification.pre.noticeWelсome form: sub-header of the welcome message
5ChatWelcome.identification.post.textChat screen after a client enters their number and name: header of the welcome phrase
6ChatWelcome.identification.post.noticeChat screen after a client enters their number and name: sub-header of the welcome phrase
7ChatWelcome.form.phone.placeholderWelcome form: prompt for entering the phone number if the mask is not set
8ChatWelcome.form.email.placeholderWelcome form: prompt for entering the email
9ChatWelcome.form.name.placeholderWelcome form: prompt for entering the name
10ChatWelcome.inactivityForm.sentFeedback form: notification after the message is sent
11ChatWelcome.inactivityForm.sendMessageFeedback form: send button

Welcome form and feedback form

Chat header

KeyDescription
1ChatHeader.emptyThe widget is being initialized and connected
2ChatHeader.titleA client has no active threads, the chat is available
3ChatHeader.searchA client has an active thread, but neither bot nor agent have not been assigned to the chat yet
4ChatHeader.operatorSubTitleA client has an active thread, a bot or an agent have been already assigned. The agent's role or other information is displayed.
5ChatHeader.inactiveThe chat is unavailable

Chat header

Rating requests

KeyDescription
1ChatPoll.post.textText after the client rates the interaction
2ChatEndPoll.textText of the rating request sent to the client - suggestion to finish the dialog
3ChatEndPoll.continueText of the client's response to the request - suggestion to continue the dialog
4ChatEndPoll.closeText of the client's response to the request - suggestion to finish the dialog

Rating requests

Message input field

KeyDescription
1ChatInput.errorSizeMessage input field: message about exceeding the allowed size of the attached file
2ChatInput.errorFormatInvalid format of the attached file error
3ChatInput.errorBrokenError of the attached corrupted file
3ChatInput.placeholderPlaceholder for entering a message
4ChatInput.attachments.uploadingMessage about the attachment upload process
5ChatInput.attachments.uploadedMessage that states the attachment is ready to be sent
6ChatInput.attachments.errorAttachment upload error

Message input field

Client notifications

KeyDescription
1Offline.down.textMessage that states the connection with the server has been lost (header)
2Offline.down.noticeMessage that states the connection with the server has been lost (sub-header)
3Offline.reconnectText on the reconnection button
4WebNotifications.newNew message web notification
5WebNotifications.attachmentsNew attachment web notification

Client notifications

Microphone access warning

KeyDescription
1MicrophoneAccessModal.titleMicrophone access warning (header)
2MicrophoneAccessModal.textMicrophone access warning (sub-header)
3MicrophoneAccessModal.buttonMicrophone access warning (button)

Microphone access warning

Emoji window localization

KeyDescription
1Emoji.recentThe Recent tab
2Emoji.peopleThe Smileys & People tab
3Emoji.natureThe Animals & Nature tab
4Emoji.foodsThe Food & Drink tab
5Emoji.activityThe Activity tab
6Emoji.placesThe Travel & Places tab
7Emoji.objectsThe Objects tab
8Emoji.symbolsThe Symbols tab

Emoji window localization

undefined

KeyDescription
1ButtonsSurvey.thanksThe text of gratitude for the response to the push-button survey

Example of redefining some locales

settings.json:

{
"locale": "en",

... // other settings

"locales": {
"ChatWelcome": {
"remained": {
"ru": "Осталось"
},
"identification": {
"pre": {
"notice": {
"ru": "Представьтесь, пожалуйста, и начнём.",
"en": "Please, introduce yourself."
}
}
}
},
"ChatInput": {
"placeholder": {
"en": "Type your message here..."
}
}
}
}

Default structure and values

{
"errors": {
"file": {
"restricted": {
"type": {
"ru": "Неверный тип файла. Файл не может быть загружен",
"en": "Invalid file type. The file cannot be uploaded",
"az": "Invalid file type. The file cannot be uploaded",
"id": "Invalid file type. The file cannot be uploaded"
},
"size": {
"ru": "Файл не может быть загружен, невалидный размер файла",
"en": "Invalid file size. The file cannot be uploaded",
"az": "Invalid file size. The file cannot be uploaded",
"id": "Invalid file size. The file cannot be uploaded"
},
"not-found": {
"ru": "Файл не найден",
"en": "File not found",
"az": "File not found",
"id": "File not found"
}
},
"disallowed": {
"ru": "Файл не прошел проверку",
"en": "The file has failed verification",
"az": "The file has failed verification",
"id": "The file has failed verification"
},
"timeout": {
"ru": "Попытка загрузки файла завершена по таймауту",
"en": "The attempt to upload the file is completed by timeout",
"az": "The attempt to upload the file is completed by timeout",
"id": "The attempt to upload the file is completed by timeout"
},
"unexpected-error": {
"ru": "Непредвиденная ошибка загрузки файла",
"en": "Unexpected file upload error",
"az": "Unexpected file upload error",
"id": "Unexpected file upload error"
}
}
},
"BadBrowser": {
"headerPartial": {
"ru": "Возможна некорректная работа виджета в вашем браузере. Рекомендуемые браузеры – [Safari](https://www.apple.com/safari/) и [Chrome](https://www.google.com/chrome/)",
"en": "The widget may work incorrectly in your browser. Recommended browsers are [Safari](https://www.apple.com/safari/) and [Chrome](https://www.google.com/chrome/)",
"az": "The widget may work incorrectly in your browser. Recommended browsers are [Safari](https://www.apple.com/safari/) and [Chrome](https://www.google.com/chrome/)",
"id": "The widget may work incorrectly in your browser. Recommended browsers are [Safari](https://www.apple.com/safari/) and [Chrome](https://www.google.com/chrome/)"
}
},
"common": {
"time": {
"today": {
"ru": "сегодня",
"en": "today",
"az": "today",
"id": "hari ini"
},
"yesterday": {
"ru": "вчера",
"en": "yesterday",
"az": "yesterday",
"id": "kemarin"
}
},
"typing": {
"ru": "печатает...",
"en": "typing...",
"az": "typing...",
"id": "typing..."
}
},
"LimitedTextarea": {
"chars": {
"ru": "осталось символов",
"en": "characters left",
"az": "qalan işarələr",
"id": "simbol kiri"
}
},
"ChatHeader": {
"empty": {
"ru": "Чат",
"en": "Chat"
},
"title": {
"ru": "Добро пожаловать в чат!",
"en": "Welcome to chat"
},
"search": {
"ru": "Поиск оператора",
"en": "Looking for operator"
},
"operatorSubTitle": {
"ru": "оператор",
"en": "operator"
},
"inactive": {
"ru": "Чат временно недоступен",
"en": "Chat temporarily unavailable"
}
},
"ChatWelcome": {
"sendWelcome": {
"ru": "Представиться",
"en": "Start chat",
"az": "Çata başlamaq",
"id": "Start chat"
},
"identification": {
"pre": {
"text": {
"ru": "Появились вопросы к нам? Давайте обсудим здесь",
"en": "Can we help you? Let's discuss it in chat.",
"az": "Sizə necə kömək edə bilərik?",
"id": "Bisakah kami membantu Anda? Mari kita bahas dalam obrolan"
},
"notice": {
"ru": "Представьтесь, пожалуйста, и начнём",
"en": "Please, tell us something about yourself",
"az": "Zəhmət olmasa, özünüz barədə məlumat verin",
"id": "Tolong, beri tahu kami sesuatu tentang diri Anda"
}
},
"post": {
"text": {
"ru": "Спасибо за то, что представились",
"en": "Thank you for sharing",
"az": "Bölüşdüyünz üçün təşəkkür edirik",
"id": "Terima kasih sudah berbagi"
},
"notice": {
"ru": "Это необходимо для идентификации",
"en": "It will help us to support you later",
"az": "Bu bizə sizə daha sonra xidmət göstərməyə kömək edəcək",
"id": "Ini akan membantu kami untuk mendukung Anda nanti"
}
}
},
"form": {
"phone": {
"placeholder": {
"ru": "Номер телефона",
"en": "Phone number",
"az": "Phone number",
"id": "Phone number"
}
},
"email": {
"placeholder": {
"ru": "Электронная почта",
"en": "Email",
"az": "Email",
"id": "Email"
}
},
"name": {
"placeholder": {
"ru": "Ваше имя",
"en": "Name",
"az": "Name",
"id": "Name"
}
}
},
"inactivityForm": {
"sent": {
"ru": "Ваше сообщение отправлено в контактный центр. С Вами свяжется оператор",
"en": "Your message was sent to the contact center. Wait for the reply"
},
"sendMessage": {
"ru": "Отправить",
"en": "Send",
"az": "Göndərmək",
"id": "Send"
}
}
},
"ChatPoll": {
"post": {
"text": {
"ru": "Спасибо за вашу оценку",
"en": "We appreciate your choice",
"az": "Seçiminiz üçün təşəkkür edirik!",
"id": "Kami menghargai pilihan Anda"
}
}
},
"ChatEndPoll": {
"text": {
"ru": "Вы получили ответы на все вопросы, завершить консультацию?",
"en": "Do you have any other questions for us?",
"az": "Əlavə sualınız olacaqmı?",
"id": "Apakah Anda memiliki pertanyaan lain untuk kami?"
},
"continue": {
"ru": "Продолжить",
"en": "Yes",
"az": "Bəli",
"id": "Ya"
},
"close": {
"ru": "Завершить",
"en": "No",
"az": "Xeyr",
"id": "Tidak"
}
},
"ChatInput": {
"errorSize": {
"ru": "превышен максимальный размер",
"en": "the uploaded file exceeds the",
"az": "Yüklədiyiniz fayl ….. aşır",
"id": "the uploaded file exceeds the"
},
"errorFormat": {
"ru": "недопустимый формат файла",
"en": "invalid file format",
"az": "Yanlış fayl formatı",
"id": "invalid file format"
},
"errorBroken": {
"ru": "Файл поврежден",
"en": "The file is corrupted",
"az": "The file is corrupted",
"id": "The file is corrupted"
},
"placeholder": {
"ru": "Ваше сообщение...",
"en": "Type your message here...",
"az": "Mesajınızı burada yazın...",
"id": "Masukan pesan anda disini..."
},
"attachments": {
"uploading": {
"ru": "Загрузка вложения...",
"en": "Uploading...",
"az": "Yüklənir...",
"id": "Uploading..."
},
"uploaded": {
"ru": "Готов. Отправить – Enter",
"en": "uploaded. Press Enter",
"az": "Yükləndi. Enter-i tıklayın",
"id": "uploaded. Press Enter"
},
"error": {
"ru": "Не удалось загрузить вложение",
"en": "Upload failed",
"az": "Yükləmə baş tutmadı",
"id": "Upload failed"
}
}
},
"RateIndicator": {
"of": {
"ru": "из",
"en": "of",
"az": "of",
"id": "of"
}
},
"ChatMessage": {
"yourself": {
"ru": "Вы",
"en": "You"
},
"youWrote": {
"ru": "Вы",
"en": "You"
},
"operatorWrote": {
"ru": "Оператор {{name}}",
"en": "Operator {{name}}"
},
"audio": {
"compatibility": {
"ru": "Ваш браузер не поддерживает аудио контент",
"en": "Your browser does not support audio playback",
"id": "Your browser does not support audio playback",
"az": "Your browser does not support audio playback"
},
"errorPlayback": {
"ru": "Аудио сообщение не может быть воспроизведено",
"en": "Audio message can't be played",
"id": "Audio message can't be played",
"az": "Audio message can't be played"
},
"errorSpeech": {
"ru": "Ошибка распознавания",
"en": "Recognition error",
"id": "Recognition error",
"az": "Recognition error"
},
"quoteInfo": {
"ru": "аудиосообщение",
"en": "audio message",
"id": "audio message",
"az": "audio message"
}
},
"downloadError": {
"ru": "Ошибка загрузки",
"en": "Download error"
},
"sendError": {
"ru": "Сообщение не отправлено",
"en": "The message has not been sent"
},
"messageDeleted": {
"ru": "Сообщение удалено",
"en": "Deleted message"
},
"messageEdited": {
"ru": "ред.",
"en": "ed."
}
},
"Offline": {
"down": {
"text": {
"ru": "Потеряна связь с сервером",
"en": "Connection is dropped",
"az": "Bağlantı kəsildi",
"id": "Connection is dropped"
},
"notice": {
"ru": "проверьте ваше подключение к сети интернет",
"en": "check your internet connection",
"az": "İnternetlə bağlantınızı yoxlayın",
"id": "check your internet connection"
}
},
"reconnect": {
"ru": "Подключиться снова",
"en": "Reconnect",
"az": "Təkrar bağlan",
"id": "Reconnect"
}
},
"WebNotifications": {
"new": {
"ru": "Новое сообщение: ",
"en": "New message: ",
"az": "Yeni mesaj: ",
"id": "New message: "
},
"attachments": {
"ru": "Новое вложение",
"en": "New attachment",
"az": "New attachment",
"id": "New attachment"
}
},
"SocialLinks": {
"text": {
"ru": "Спросить в мессенджере",
"en": "Ask in the messenger",
"id": "Bertanya the messenger"
}
},
"MicrophoneAccessModal": {
"title": {
"ru": "Нет доступа к микрофону",
"en": "No access to your microphone"
},
"text": {
"ru": "Чтобы записать голосовое сообщение, разрешите доступ к микрофону в настройках браузера",
"en": "To be able to record voice messages, you need to allow access to your microphone in the browser settings"
},
"button": {
"ru": "Понятно",
"en": "Ok"
}
},
"Emoji": {
"recent": {
"ru": "Недавние",
"en": "Frequently Used",
"id": "Sering digunakan",
"az": "Son istifadə olunmuş"
},
"people": {
"ru": "Смайлики и люди",
"en": "Smileys & People",
"id": "Smiley & Orang",
"az": "Smayllar və insanlar"
},
"nature": {
"ru": "Животные и природа",
"en": "Animals & Nature",
"id": "Hewan & Alam",
"az": "Heyvanlar və təbiət"
},
"foods": {
"ru": "Еда и напитки",
"en": "Food & Drink",
"id": "Makanan Minuman",
"az": "Qida və içkilər"
},
"activity": {
"ru": "Активности",
"en": "Activity",
"id": "Aktivitas",
"az": "Fəallıq"
},
"places": {
"ru": "Путешествия и места",
"en": "Travel & Places",
"id": "Travel & Places",
"az": "Səyahət və yerlər"
},
"objects": {
"ru": "Предметы",
"en": "Objects",
"id": "Benda",
"az": "Əşyalar"
},
"symbols": {
"ru": "Символы",
"en": "Symbols",
"id": "Simbol",
"az": "Simvollar"
}
},
"ButtonsSurvey": {
"thanks": {
"ru": "Спасибо за участие в опросе!",
"en": "Thank you for participating in our survey!",
"id": "Thank you for participating in our survey!",
"az": "Thank you for participating in our survey!"
}
}
}