Language
Language
The widget has support for localisation via the locale
config. You can provide a locale string, for example, en-GB
, where the first two lowercase letters define the languages code (ISO 639-1 format) and the second two capitalized letters define the country code (ISO 3166-1 alpha-2 standard). This enables the widget to provide different translations for the same language across different regions.
The frontend team manage the default translation files. If you want another locale to be added please request this in the #talk-to-frontend
channel. You will need to provide translations for all the properties in the object below.
If no locale is provided in the config the widget will default to using en-GB
.
Currently supported locales are:
- en-GB // British English
- en-US // American English
- nl-NL // Dutch
- de-DE // German
- es-ES // Spanish
- fr-FR // French
- js-JP // Japanese
- sv-SE // Swedish
- pt-PT // Portuguese
- no-NO // Norwegian
- it-IT // Italian
- da-DK // Danish
- pl-PL // Polish
lang: {
sendingUserMessageText: 'Sending...',
dragAndDropMessage: 'Drag and drop file here',
header: '',
chatInputPlaceholder: 'Type message here',
prechatButtonText: 'Start Chat',
prechatFormSelectPlaceholderText: 'Select',
messageLimitErrorText: 'Oops, that message is too long',
endChatHeader: 'End Chat',
endChatQuestion: 'Are you sure you want to end chat?',
endChatConfirmButton: 'End chat',
endChatCancelButton: 'Cancel',
carouselSelectionButtonText: 'Select',
idleTimeoutPrefixMessage: 'Are you still there? Please send a message within',
idleTimeoutSuffixMessage: 'or this chat will time out',
returnToMainMenu: 'Return to main menu',
messageFeedbackText: 'Was this helpful?',
userClosedChatMessageToAgent: '*** USER CLOSED CHAT. ***',
listPopupSubmitButtonText: 'Confirm',
agent: {
agentEndedChat: 'Agent left the chat',
agentDisconnected: 'The agent disconnected',
agentJoined: 'An agent joined the chat',
namedAgentEndedChat: 'left the chat',
namedAgentDisconnected: 'disconnected',
namedAgentJoined: 'joined the chat',
agentTransferredChat: 'You are being transferred to another agent',
queueMessageWithPosition: 'You are in a queue. Your position is',
queueMessage: 'You are in a queue.',
agentJoining: 'An agent is joining',
couldNotConnect: 'Could not connect to any agents',
connectingToAnAgent: 'Connecting you with an agent',
reconnectingToAnAgent: 'Attempting to reconnect to an agent',
couldNotUploadFile: 'There was a problem uploading your file. Please try again.',
disconnectedReconnecting: 'You were disconnected. Connecting you to another agent',
automatedAgentMessage: 'An agent will assist you shortly',
chatEndedDueToInactivity: 'Chat ended due to inactivity',
chatConnectionLost: 'Chat ended due to loss of connection',
},
flow: {
defaultErrorMessage: 'We were unable to handle your request. Please try again',
},
server: {
defaultErrorHeading: 'Oops! An error occurred!',
errorMessageLine1: 'Try restarting the chat below.', // supports markdown
errorMessageLine2: 'If the issue persists, please contact our support team.', // supports markdown
restartButtonText: 'Restart',
},
fileUploadErrors: {
virus: {
title: 'Oops!',
descr: 'This file may contain a virus or other malware and can\'t be uploaded. Try another file.',
},
tooLarge: {
title: 'Too Big!',
descr: 'Files that are more than 16MB cannot be uploaded. Try another file.',
},
generic: {
title: 'Oops!',
descr: 'There was a problem uploading this file. Try another file.',
},
},
newMessageNotifyText: 'New Message',
csatLang: {
ai: {
csatNotice: null,
csatTitle: 'Please rate this chat',
},
agent: {
csatNotice: 'Agent has ended the chat.',
csatTitle: 'Please rate this conversation',
},
customer: {
csatNotice: null,
csatTitle: 'Please rate this chat before you go',
},
csatFeedbackTitle: { // Pass a string if dynamic text is not required.
1: 'Thanks for your feedback, we\'re sorry we couldn\'t help here',
2: 'Thanks for your feedback, we\'re sorry we couldn\'t help here',
3: 'Thanks for your feedback!',
4: 'Thank you and have a lovely day!',
5: 'Thank you and have a lovely day!',
},
ratingsText: ['Terrible', 'Bad', 'Okay', 'Good', 'Excellent'],
csatFeedbackButtonText: 'Submit',
csatFeedbackTextareaPlaceholder: { // Pass a string if dynamic text is not required.
1: 'Please feel free to leave any additional comments or feedback to help us improve.',
2: 'Please feel free to leave any additional comments or feedback to help us improve.',
3: 'We appreciate your comments and suggestions.',
4: 'Please feel free to leave any additional comments or feedback about what we did well.',
5: 'Please feel free to leave any additional comments or feedback about what we did well.',
},
csatCommentsCancelButtonText: 'No Thanks',
},
internetConnectionLost: "Your internet connection appears to have been lost. Please check and try again.",
internetConnectionRestored: "You're back online!",
iframeTitles: {
proactive: 'DigitalGenius Chat Proactive App',
proactiveScript: 'DigitalGenius Chat Proactive Script',
launcher: 'DigitalGenius Chat Launcher App',
launcherScript: 'DigitalGenius Chat Launcher Script',
widget: 'DigitalGenius Chat App',
widgetScript: 'DigitalGenius Chat Script',
attachmentsPreview: 'DigitalGenius Attachments App',
},
accessibilityLabels: { // Not visible in the UI, but important for users using screen readers
launcher: 'Open chat widget',
minimiseWidget: 'Minimise chat widget',
closeWidget: 'Close chat widget',
alertMessage: 'Alert message with type',
inputSubmit: 'Submit',
downloadImage: 'Download image',
carousel: 'Product carousel',
carouselPrevious: 'Go to previous item',
carouselNext: 'Go to next item',
chatForm: 'Enter a message',
chatFormSubmit: 'Send message',
chatFormUpload: 'Upload a file',
CSATTextarea: 'Enter a comment',
close: 'Close',
previewImage: 'Open image preview',
messageFeedbackPositive: 'Mark message as helpful',
messageFeedbackNegative: 'Mark message as unhelpful',
messageFeedbackReset: 'Feedback provided. Select again to reset your feedback',
},
};
Updated 9 days ago