How to use t() function in controller?
$this-&gt;t() assumes object context. $this isn't available in the static context of the create method above.

The ControllerBase provides access to t() via a protected function (see below from docs) to it is also not available from the public context. 
setStringTranslation however is a publicly available method.

StringTranslationTrait::t   protected   function    Translates a string to the current language or to a given language.
...
StringTranslationTrait::setStringTranslation    public  function    Sets the string translation service to use.


https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Controller%21ControllerBase.php/class/ControllerBase/8.2.x