title: translate dynamic string in angular 10 using ngx-translate
body: <p>I am using some dynamic values to create a string and sending that to sweetalert config.</p>
  <p>I was wondering is there any way we can translate the string before sending to config?</p>
  <p>I had seen couple of solutions where we can pass variable to translate method but is there any other solutions can be used?</p>
  <p>What should I add in en.json?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let status = '';
  switch (action?.innerText) {
      case 'Accept': {
          status = 'Accepted';
          break;
      }
      case 'Approve': {
          status = 'Approved';
          break;
      }
      case 'Delete': {
          status = 'Deleted';
          break;
      }
      case 'Reject': {
          status = 'Rejected';
          break;
      }
  }
  
  //You have ${status} a Request for $${this.data?.details?.amount}
  let transalteTitle;
  this.translate.get('You have', {
      value: status
  }, ' a Request for', {
      value: this.data?.details?.amount
  }).subscribe(res =&gt; {
      transalteTitle = res;
  });
  
  const configval = {
      title: transalteTitle,
      text: 'Do you want to continue?',
      showCancelButton: true,
      icon: 'warning',
      confirmButtonText: 'YES',
      cancelButtonText: 'NO'
  };
  
  
  //en.json
  
  {
      "title": "You have ${status} a Request for ${val}"
      "status_accepted": "accepeted",
      "status_rejected": "rejected"
  }</code></pre>
  </div>
  </div>
  </p>