This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/Project/Controllers/HomeController.cs | |
// using the HomeController as an example | |
// you don't need it if you only want to localize strings in your views | |
public IStringLocalizer<SharedResource> _localizer; | |
// here comes the magic: the DI will inject your localizer | |
// created by the factory you set up at Startup.ConfigureServices() | |
public HomeController(IStringLocalizer<SharedResource> localizer) | |
{ |