I cannot localize a string to present a javascript alert to the user. @Localizer works in my views outside of javascript in HTML: @Localizer["messageToLocalize"];
Here is my code block inside tags:
The commented-out line returns this javascript error in Chrome Developer Tools:
Uncaught SyntaxError: missing ) after argument list
But of course outside of a javascript block it works: @Localizer["Please select a Provider"]
How can I localize the string I want to return to the user?
if (providerIndex < 1) {
//alert(@Localizer["Please select a Provider"]);
alert("Please select a Provider");
return
}