I'am developing multi language web site with .net core mvc. I used Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer.
This code is work fine in .cshtml for me
@inject Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer<ExampleProject.WEB.Controllers.HomeController> localizer
@localizer["NotificationManage"]
Also works between <script> tags in _Layout page
alert('@localizer["NotificationManage"]');
But don't working in js file.
How to use Resx file in javascript file.?
What another best to way make multi language to javascript?
alert('@localizer["NotificationManage"]');
Not working for me.
Alert Result is:@localizer["NotificationManage"];