CometChat Go Documentation

Welcome Ninja!

You'll find comprehensive guides and documentation to help you start working with CometChat as quickly as possible. Let's jump right in!

Get Started    

Localization

This guide helps you set language at run time using a simple variable. Please ensure that you have an equivalent language pack enabled in CometChat Admin Panel -> Localize.

To change the language using Javascript, replace the Launch CometChat code as follows:

<!-- USER MANAGEMENT CODE -->

<!-- Refer to User Management guide for this code -->

<!-- LAUNCH COMETCHAT CODE -->
  
<script type="text/javascript">
  var chat_appid = 'XXXXX'; // App ID
  var chat_language = 'fr'; // Language

  (function() {
    var css = document.createElement('link'); css.rel = 'stylesheet'; css.type = 'text/css'; css.href = 'https://fast.cometondemand.net/'+chat_appid+'x_xchat.css';
    document.getElementsByTagName("head")[0].appendChild(css);
    var js = document.createElement('script'); js.type = 'text/javascript'; js.src = 'https://fast.cometondemand.net/'+chat_appid+'x_xchatx_xx_xx_xx_xx_xx_x'+chat_language+'.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(js, s);
  })();
</script>
setcookie("cc_lang",'fr',time()+31556926 ,'/');

Updated 2 years ago

Localization


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.