title: String interpolation on the result of a function that returns string
body: <p>I have a function which gets some text from an xml file like this:</p>
  
  <pre><code>var text = Translate("/foo/bar");
  </code></pre>
  
  <p>Now in the XML I want to put in string interpolation constants like this:</p>
  
  <pre><code>&lt;foo&gt;
    &lt;bar&gt;Hi, {firstName} {lastName}!&lt;/bar&gt;
  &lt;/foo&gt;
  </code></pre>
  
  <p>So, I want to do string interpolation on the result of the Translate-function, that would be something like:</p>
  
  <pre><code>var firstName = "John";
  var lastName = "Smith";
  var formattedText = $Translate("/foo/bar");
  </code></pre>
  
  <p>But that doesn't seem to work.
  Is there any way to to this, except reverting to string.Format ?</p>
  
  <p>It could be nice if the dollar sign could be placed in front of anything that is a string, be it a variable, a string or a function, to do string interpolation.</p>
  
  <p>It's worth mentioning that I don't have control over the code for the Translate-function, since it's in a third party component.</p>