These messages will be translated to other cultuers by XLocalizer depending on the request culture. So, this is a single place and simple way to customize all error messages. īelow is the fully localized sample of Register.cshtml page, notice that we only need to add “ localize-content” attribute to the relevant tag, that keeps the page code clean and makes it easy to read and update. Dummy class for grouping and accessing resource files public class LocSource Visit DOCS for more details. This class will be used to access the relevant resource files from the code. Resources folder: Under the project root create a new folder named “ LocalizationResources”, then inside it create a new empty class named “LocSource”.The main package PM > Install-Package XLocalizer // Online translation support PM > Install-Package XLocalizer.Translate // Translation service PM > Install-Package // Use html tags to localize views PM > Install-Package XLocalizer.TagHelpers // Additional taghelper package for language dropdown PM > Install-Package LazZiya.TagHelpers A few nugets is required to get the best of XLocalizer, first I will mention all pacakges, then we will see the role of each one in the next steps. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |