I need to have some lines from a resource file in my views. In Startup.cs:
services.AddMvc() .AddViewLocalization(options => options.ResourcesPath = "Resources");
and
app.UseRequestLocalization(new RequestCulture("ru-RU"));
View:
@using Microsoft.AspNet.Mvc.Localization @inject IViewLocalizer loc
I read the following on the MSDN blog:
IViewLocalizer is an IHtmlLocalizer service that searches for a resource based on the current view name.
So, how should I name .resx files so that my localized strings appear in my view? If I have Views/Manager/Index.cshtml , is Resources/Manager/Index.cshtml.ru-RU.resx correct? But the resource was not found ...
source share