If you have a multi-lingual website, you may want to change the default language of CometChat before loading it.
- Make sure that the language pack has been added in
CometChat Admin Panel->
- Set the language using a simple cookie before adding the CometChat HTML code. For example, if you want to set the language to French, your code will be something like-
// Set Expiry Date var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); expires = "; expires=" + date.toUTCString(); // Set Cookie document.cookie = 'cc_lang' + "=" + 'fr' + expires + "; path=/";
You can learn more about it in our developer documentation.