title: Delphi: Getting the UnitName of the caller function
body: <pre><code>unit MyFirstUnit;
    uses MyTranslateUnit;
    ...
    sText := Dictionary('text to translate', UnitName);
    ...
  end.
  </code></pre>
  
  <p> </p>
  
  <pre><code>unit AnotherUnit;
    uses MyTranslateUnit;
    ...
    sText := Dictionary('new text to translate', UnitName);
    ...
  end.
  </code></pre>
  
  <p> </p>
  
  <pre><code>unit MyTranslateUnit;
    function Dictionary(sTextToTranslate: string; sUnitName: string)
    begin
      // Here I need the UnitName of the caller
      Result := ...
    end;
  end.
  </code></pre>
  
  <p>There are quite many places in my program where I call <strong>Dictionary(...)</strong>. How can I avoid passing the UnitName as second parameter?<br>
  Is it possible to get the UnitName of the caller within MyTranslateUnit without having a second parameter?</p>
  
  <p>I want to have a function like</p>
  
  <blockquote>
    <p>function Dictionary(sTextToTranslate: string)</p>
  </blockquote>