Answer by SM Mirabolghasemi for How to localize ASP.NET Identity UserName and...
I added this package to my project:PiotrTrojan.AspNetCore.IdentityErrorLocalizationAnd I simply added this line of code in Program.csbuilder.Services.AddIdentity<User, IdentityRole>(options...
View ArticleAnswer by ertugrulakdag for How to localize ASP.NET Identity UserName and...
for PasswordContainseSequence example public static string IdentityErrorToTurkish(string code, string description) { switch (code) { case "PasswordContainseSequence": description = "Parola sayısal sıra...
View ArticleAnswer by cdie for How to localize ASP.NET Identity UserName and Password...
French version (with C# 9 syntax) :public class FrenchIdentityErrorDescriber : IdentityErrorDescriber{ public override IdentityError DefaultError() => new() { Code = nameof(DefaultError),...
View ArticleAnswer by Viktor Kozenko for How to localize ASP.NET Identity UserName and...
Ukrainian translation for Andrew Basarab answerResource file data:<data name="ConcurrencyFailure" xml:space="preserve"><value>Помилкапаралельності,...
View ArticleAnswer by Mustafa Can Karaoğlu for How to localize ASP.NET Identity UserName...
Here is IdentityErrorDescriber's Turkish Translationusing Microsoft.AspNetCore.Identity;public class TurkishIdentityErrorDescriber : IdentityErrorDescriber{ public override IdentityError DefaultError()...
View ArticleAnswer by nforss for How to localize ASP.NET Identity UserName and Password...
Based on the answers here, I made my own implementation for our multilanguage web site built on MVC Core 2.2, where the strings cannot be hard coded.I'm using a basic resource file with auto generated...
View ArticleAnswer by Mahdi Moeinifar for How to localize ASP.NET Identity UserName and...
this is for dear Farsi(Persian) speakersusing Microsoft.AspNetCore.Identity;namespace WebApplication.Admin.Helpers{ public class CustomIdentityErrorDescriber : IdentityErrorDescriber { public override...
View ArticleAnswer by René for How to localize ASP.NET Identity UserName and Password...
German Version for Solution by @GerardoGrignolipublic class CustomIdentityErrorDescriber : IdentityErrorDescriber{ public override IdentityError DefaultError() { return new IdentityError { Code =...
View ArticleAnswer by kamil062 for How to localize ASP.NET Identity UserName and Password...
Polish versionpublic class CustomErrorDescriber : IdentityErrorDescriber{ public override IdentityError DefaultError() { return new IdentityError { Code = nameof(DefaultError), Description = $"Wystąpił...
View ArticleAnswer by Peter Barbanyaga for How to localize ASP.NET Identity UserName and...
In addition to @Gerardo Grinolli answer this translated versions for Russian:public class CustomIdentityErrorDescriber : IdentityErrorDescriber{ public override IdentityError DefaultError() { return...
View ArticleAnswer by Omar Altawyan for How to localize ASP.NET Identity UserName and...
Hi Here My Solution to to translate identity errors: public string TranslateIdentityResult(string massage) { var list = new List<KeyValuePair<string, string>>() { new...
View ArticleAnswer by Ahmad Badkoubehei for How to localize ASP.NET Identity UserName and...
I managed to find a solution to create localized version of AspNet.Identity for cultures that no ready-to-use package is available for. Steps are:Download the source code from GitHub and open the...
View ArticleAnswer by Mathieu VIALES for How to localize ASP.NET Identity UserName and...
Here is Gerardo Grignoli's answer with French translation/// <inheritdoc />/// <summary>/// Service to enable localization (french) for application facing identity errors.///...
View ArticleAnswer by Daniel for How to localize ASP.NET Identity UserName and Password...
I don't want to override the logic (i.e., re-invent the wheel), nor do I want to switch to ASP NET Core. All I want to do is override the error messages and use multiple resource files (per language)...
View ArticleAnswer by Andrew Basarab for How to localize ASP.NET Identity UserName and...
ASP NET Core workaround (25.11.2016)You can inject IStringLocalizer into custom IdentityErrorDescriber1) Create custom IdentityErrorDescriber (see Gerardo Grignoli answer)public class...
View ArticleAnswer by Donald Fraser for How to localize ASP.NET Identity UserName and...
Having come across the same problem one can provide your own resource files to achieve this. Of course it requires a bit of reflection hacking!First you will need to be running with full security, ie...
View ArticleAnswer by Hernan Demczuk for How to localize ASP.NET Identity UserName and...
My solution was a little bit dirty but It works as expected. The idea is to assign all the errors that the IdentityResult object result brings when we register a new user:var result = await...
View ArticleAnswer by Gerardo Grignoli for How to localize ASP.NET Identity UserName and...
For ASP.NET Core: (Microsoft.AspNetCore.Identity 1.0.0)Create a class that inherits IdentityErrorDescriber and override the desired error messages.public class CustomIdentityErrorDescriber :...
View ArticleAnswer by Michal Hosala for How to localize ASP.NET Identity UserName and...
This issue was bothering me for quite some time already so I tried to come up with something generic, because solution with installing Identity.Core for particular culture is only working if the...
View ArticleAnswer by Ignacio for How to localize ASP.NET Identity UserName and Password...
Let me share with you what I´ve done to accomplish this in Spanish. There you can customize the messages easily!string Errores = result.Errors.FirstOrDefault();Errores = Errores.Replace("Name "+...
View ArticleAnswer by Marselus Chia for How to localize ASP.NET Identity UserName and...
My solution is to create new custom password validation class inherits from Microsoft.AspNet.Identity.PasswordValidator, Overrides the ValidateAsync which is the one that send out the error message....
View ArticleAnswer by viking for How to localize ASP.NET Identity UserName and Password...
1AmirJalali's method works perfectly. While setting culture in web.config works, it can be set dynamically also if required, here is how this can be achieved:Thread.CurrentThread.CurrentCulture = new...
View ArticleAnswer by Amir Jalali for How to localize ASP.NET Identity UserName and...
As of version 2 of identity which released on 20 march 2014 you can now have localized error messages.First install the identity localized package.Install-Package Microsoft.AspNet.Identity.Core.frThen...
View ArticleAnswer by Cristian Lupascu for How to localize ASP.NET Identity UserName and...
I ran into the same problem and found a quick-and-dirty workaround. I looked inside the Microsoft.AspNet.Identity.Core assembly using DotPeek (I assume any C# decompiler will do) and found two classes...
View ArticleHow to localize ASP.NET Identity UserName and Password error messages?
Is it possible to provide localized strings for the "system" ASP.NET Identity v1 error messages, like "Name XYZ is already taken" or "User name XYZ is invalid, can only contain letters or digits"?
View Article
More Pages to Explore .....