Hosted Experience
Configuration Options
Language Strings
3min
you can update any of the texts displayed to a user in hosted experience you may choose to do this to provide a language specific experience, based on the users browser settings, or simply to customize the text used to fit your brand and user experience to do this, the languagestrings property can be defined to update any of the text displayed within the hosted experience interface language strings object should contain values corresponding to iso 639 1 languages, e g en, es, ja, etc within each language code value, provide an object containing the key of the value you want to update additionally a specific locale/region may be provided for more precise language targetting, e g en us, en gb, de de, pt br when a user loads the digital human experience their browser will provide a list of their preferred languages (an array in preference order) hosted experience will iteratively search the list of languagestrings you provide to find a match for the key based on the users preferred languages set in their browser more information on how the browser detects the preferred language can be found here if a language code is not provided then the 'default' value will be used if no 'default' configuration is specified by you, then the hosted experience base values will be used example the below code block displays the complete list of languagestring keys that may be used to replace a ui text within hosted experience along with the base values const uneeqoptions = { languagestrings { "default" { calltoactiontext '👋 hey! it is so good to meet you ', errortext 'an error occurred ', textinputplaceholder 'type here ', showcontenttooltip 'show content', sendquestionbuttontooltip 'send message', startrecordingbuttontooltip 'start recording', unmutemicrophonetooltip 'unmute', mutemicrophonetooltip 'mute', microphonepermissionnotallowedbuttontooltip 'microphone permission not allowed', microphoneenabledhinttitle 'microphone enabled', microphoneenabledhinttext 'you can speak to me, i\\'m listening ', microphoneenabledhinttitleoverlay 'mic enabled', microphonenotallowedmessage 'microphone permission was not allowed please allow access to your microphone ' + 'via your browser settings, and try again ', recordingtaptostart 'tap to record, tap again to send', recordingspeaknowprompt 'speak now', recordingtapstopwhendone 'tap stop when done', recordingstopbuttontooltip 'stop recording', recordingrequestingmicrophoneprompt 'requesting microphone', settingsexitbutton 'exit', confirmexitdescription 'are you sure you want to exit?', confirmexitstaybutton 'stay', confirmexitendbutton 'exit', hidecontentbutton 'hide content', hidedigitalhumanbutton 'hide digital human', reconnectingtext 'reconnecting ' sessionendedduetoinactivity 'digital human conversation has ended due to inactivity ', sessionendedbyuser 'digital human conversation ended ', sessionendedduetoconnectionloss 'digital human conversation has ended due to a connection issue ', sessionendedunexpectedly 'digital human conversation has ended unexpectedly ', sessionendedduetovideoplaybackerror 'digital human conversation has ended due to a video playback error ', sessionendedduetopermissionserror 'digital human conversation has ended due to a permissions error please check your browser settings ', sessiontransferred 'digital human conversation has transitioned ', } } } language replacement you can provide your own strings to be used for each hosted experience language you define for example, you can replace the 'es' language calltoactiontext like this languagestrings { "es" { "calltoactiontext" "¡hola! haga clic aquí para iniciar una conversación e" } } multiple language replacement const uneeqoptions = { languagestrings { "es" { "calltoactiontext" "¡hola! haga clic aquí para iniciar una conversación e", "textinputplaceholder" "escriba aquí " }, "ja" { "calltoactiontext" "やあ!会話を始めるにはここをクリックしてください。", "textinputplaceholder" "ここに入力 " }, "de de" { "calltoactiontext" "hi! klicken sie hier, um ein gespräch zu beginnen ", "textinputplaceholder" "geben sie hier ein " }, "default" { calltoactiontext '👋 hey! it is so good to meet you ', errortext 'an error occurred ', textinputplaceholder 'type here ', showcontenttooltip 'show content', sendquestionbuttontooltip 'send message', startrecordingbuttontooltip 'start recording', unmutemicrophonetooltip 'unmute', mutemicrophonetooltip 'mute', microphonepermissionnotallowedbuttontooltip 'microphone permission not allowed', microphoneenabledhinttitle 'microphone enabled', microphoneenabledhinttext 'you can speak to me, i\\'m listening ', microphoneenabledhinttitleoverlay 'mic enabled', microphonenotallowedmessage 'microphone permission was not allowed please allow access to your microphone ' + 'via your browser settings, and try again ', recordingtaptostart 'tap to record, tap again to send', recordingspeaknowprompt 'speak now', recordingtapstopwhendone 'tap stop when done', recordingstopbuttontooltip 'stop recording', recordingrequestingmicrophoneprompt 'requesting microphone', settingsexitbutton 'exit', confirmexitdescription 'are you sure you want to exit?', confirmexitstaybutton 'stay', confirmexitendbutton 'exit', hidecontentbutton 'hide content', hidedigitalhumanbutton 'hide digital human' } } }