Localization

Modified on Mon, 21 Nov, 2022 at 3:41 PM

This guide helps you set AtomChat's language at run time using a simple variable. 


Please ensure that you have the required language pack enabled in AtomChat Admin Panel -> Localize.

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


<!-- USER MANAGEMENT CODE -->

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

<!-- LAUNCH ATOMCHAT 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 ,'/');


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article