title: Injecting DI service on a extension method
body: <p>I'm trying to get the <code>IStringLocalizer</code> service instance inside a extension method, is it possible? Any suggestions on how should I inject it?</p>
  
  <p>My goal here is to translate a type using its name as convention.</p>
  
  <pre><code>public static class I18nExtensions
  {
  
      private IStringLocalizer _localizer; // &lt;&lt;&lt; How to inject it?
  
      public static string GetName(this Type type)
      {
          return _localizer[type.Name].Value;
      }
  }
  </code></pre>