Base solution for your next web application
Open Closed

What's the best way to solve the problem of no separate language keys for Name and FirstName ?? #9103


User avatar
0
eric_pulaski created

I'm running into an issue and looking for the best path forward. ASP.NET Zero has two language keys related to the user's name: Name and Surname. In the United States, we usually call these "First Name" and "Last Name", which is how I want the fields labeled when a user edits his or her properties. Howewer, the Name language Key is also used in other areas to refer to the user's full name. For example, when adding members to an Organizational Unit, the Name languae key is used for the title of the colum which has what I would call the users "Full Name" (for me, that's "Eric Pulaski" - my first name + last name.

Why is the language Key Name used to refer at some times to the user's first name, and at other times to the user's full name? Why is there no language key for "First Name" separate from "Name"?

To solve this problem, I was thinking about creating a new language key called 'FirstName' and changing the code to use this language key for the label of the "first name" fields when (1) the user edit's his or her own profile and when (2) the admin user edit's another user's profile info from the admin menu. Other than these 2 places, is there anywhere else that first name is separated out from last name in ASP.NET Zero. Is this the best way to solve this problem?

Thanks in advance for any help. -Eric


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @eric_pulaski,

    You are right, the usage seems inconsistent. Your solution seems fine. If you can also create an issue on GitHub https://github.com/aspnetzero/aspnet-zero-core, we can also implement your changes into AspNet Zero.

    Thanks,

  • User Avatar
    0
    eric_pulaski created

    Thanks for the reply. I created issue #3319 in GitHub: https://github.com/aspnetzero/aspnet-zero-core/issues/3319