title: How to get / inject ILocalizationContext inside service or controller
body: <p>I'd like to know how to get ILocalizationContext inside the service or the controller. For example, I would like to get the DisplayName of the permission but it requires "ILocalizationContext": DisplayName.Localize(ILocalizationContext).
  I tried injection, it doesn't work...</p>
  
  <p>I tried multiple ways to inject it, constructor, using... I can see something similar inside "PermissionCheckerExtensions" :</p>
  
  <pre><code>var iocManager = (permissionChecker as IIocManagerAccessor).IocManager;
          using (var localizationContext = iocManager.ResolveAsDisposable&lt;ILocalizationContext&gt;())
          {
              using (var permissionManager = iocManager.ResolveAsDisposable&lt;IPermissionManager&gt;())
              {
                  return permissionNames.Select(permissionName =&gt;
                  {
                      var permission = permissionManager.Object.GetPermissionOrNull(permissionName);
                      return permission?.DisplayName == null
                          ? permissionName
                          : permission.DisplayName.Localize(localizationContext.Object);
                  }).ToArray();
              }
          }
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <p>The problem was from myself... You can just inject it with the controller and it should work.</p>