title: How can I add a Freshdesk widget during runtime in Angular?
body: <p>I'm using Angular 9 and am trying to add a Freshdesk widget to my app. The snippet for that widget that looks like this:</p>
  <pre><code>&lt;script&gt;
  window.fwSettings={
  'widget_id': &lt;MY PERSONAL ID&gt;,
  'locale': 'en'
  };
  !function(){if(&quot;function&quot;!=typeof window.FreshworksWidget){var n=function(){n.q.push(arguments)};n.q=[],window.FreshworksWidget=n}}() 
  </code></pre>
  
  
  <p>If I add the snippet directly into my <code>index.html</code> file it works fine but I want to be able to programatically set the <code>locale</code> property to whatever language the current user has chosen.</p>
  <p>That means this snippet needs to be added during runtime, but I have no idea how to it in Angular.</p>
  <p>Any ideas?</p>