Localised date format

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. 

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.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.