You can specify the localised date and time format your chat widget should use by specifying the language and country tag with the locale property.
- For a list of language and country codes, see:
The ISO-639-1 two-letter language codes. - The ISO 3166-1 alpha-2 two-letter country codes.
Specifying the country code is optional. Unsupported country codes will fall back to the generic language; unsupported languages will fall back to en-US.
Specifying a locale does not override the timestamp formatting in the chat widget's user interface strings. If you override the locale, you should also use the customText object to provide appropriate timestamp formats. For a list of date and time formats, see the date-fns.org documentation.
<script>
const options = {
integrationId: '<integration Id>',
locale: 'fr-CA',
customText: {
conversationTimestampHeaderFormat: 'MMM Do YYYY HH:mm',
conversationListTimestampFormat: 'DD/MM/YY',
},
},
ingeniousai.init(options).then();
</script>
Translation not included...
Setting the locale property does not provide automatic translation of the chat widget's user interface text strings. If you want to provide translated strings, you specify the translations using the customTest property.
Comments
Article is closed for comments.